From nobody@FreeBSD.ORG  Tue Oct 24 14:00:57 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id DD13737B479; Tue, 24 Oct 2000 14:00:57 -0700 (PDT)
Message-Id: <20001024210057.DD13737B479@hub.freebsd.org>
Date: Tue, 24 Oct 2000 14:00:57 -0700 (PDT)
From: ian@mahuron.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: stock perl5 build does not support %Z spec in strftime
X-Send-Pr-Version: www-1.0

>Number:         22279
>Category:       bin
>Synopsis:       stock perl5 build does not support %Z spec in strftime
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 24 14:10:01 PDT 2000
>Closed-Date:    Thu Jun 14 03:28:31 PDT 2001
>Last-Modified:  Thu Jun 14 03:29:32 PDT 2001
>Originator:     Ian Mahuron
>Release:        4.0
>Organization:
>Environment:
FreeBSD dev01.xxx.com 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Thu Sep 21 14:20:32 PDT 2000     ian@dev01.xxx.com:/usr/src/sys/compile/DEV01  i386
>Description:
Perl's POSIX module is a wrapper for common POSIX routines... one of the functions in this module is strftime.

It works as expected, unless you make use of the %Z spec (returns ???).
Making use of strftime via a c program results in correct behavior (returns PDT).
>How-To-Repeat:
Perl script:
perl -MPOSIX -e 'print(strftime("%Z", (localtime)), "\n");'
# prints "???"

C script:
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
int main(void) {
        char buff[4];
        time_t now = time(NULL);
        strftime(buff, sizeof(buff), "%Z", localtime(&now) );
        printf("%s\n", buff);
        return;
}
// prints 'PDT'
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: schweikh 
State-Changed-When: Thu Jun 14 03:28:31 PDT 2001 
State-Changed-Why:  
Fixed in -current (which uses perl 5.6.0). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22279 
>Unformatted:
