From owner-freebsd-bugs Tue Oct 24 14:10: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5F2A637B4C5 for ; Tue, 24 Oct 2000 14:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA76796; Tue, 24 Oct 2000 14:10:01 -0700 (PDT) (envelope-from gnats@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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/22279: stock perl5 build does not support %Z spec in strftime Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 24 14:10:01 PDT 2000 >Closed-Date: >Last-Modified: >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 #include #include 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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message