From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 17 15:40:32 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3C5716A4CE for ; Wed, 17 Nov 2004 15:40:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD62743D48 for ; Wed, 17 Nov 2004 15:40:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) iAHFeVu6030406 for ; Wed, 17 Nov 2004 15:40:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iAHFeVQb030405; Wed, 17 Nov 2004 15:40:31 GMT (envelope-from gnats) Resent-Date: Wed, 17 Nov 2004 15:40:31 GMT Resent-Message-Id: <200411171540.iAHFeVQb030405@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sergey Potapov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B81A116A4CE for ; Wed, 17 Nov 2004 15:36:20 +0000 (GMT) Received: from bar.alkor.ru (bar.smartspb.net [217.119.16.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id A975C43D55 for ; Wed, 17 Nov 2004 15:36:19 +0000 (GMT) (envelope-from sp@bar.alkor.ru) Received: from bar.alkor.ru (localhost [127.0.0.1]) by bar.alkor.ru (8.12.10/8.12.10) with ESMTP id iAHFaHEJ095744 for ; Wed, 17 Nov 2004 18:36:17 +0300 (MSK) (envelope-from sp@bar.alkor.ru) Received: (from sp@localhost) by bar.alkor.ru (8.12.10/8.12.10/Submit) id iAHFaH4X095743; Wed, 17 Nov 2004 18:36:17 +0300 (MSK) (envelope-from sp) Message-Id: <200411171536.iAHFaH4X095743@bar.alkor.ru> Date: Wed, 17 Nov 2004 18:36:17 +0300 (MSK) From: Sergey Potapov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/74042: Perl-5.6.1 does not handle timezone properly X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Sergey Potapov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2004 15:40:32 -0000 >Number: 74042 >Category: ports >Synopsis: Perl-5.6.1 does not handle timezone properly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 17 15:40:31 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Sergey Potapov >Release: FreeBSD 5.2.1-RELEASE-p4 i386 >Organization: no >Environment: System: FreeBSD bar.alkor.ru 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 #0: Thu Apr 1 12:35:12 MSD 2004 amil@:/usr/src/sys/i386/compile/MAIL i386 This is perl, v5.6.1 built for i386-freebsd Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. >Description: Perl POSIX::strftime does not handle daylight saving correctly. Detail are in "How-To-Repeat". It's probably problem of Perl. Repeated on 4.10-RELEASE >How-To-Repeat: $ cc -Wall t.c $ cat t.c # - C program #include #include static void printtime(time_t t) { char buf[256]; strftime(buf,sizeof(buf),"%F %T %z %Z\n",localtime(&t)); printf(buf); } int main(void) { time_t t = time(NULL); t = t - t%(24*3600); printtime(t); printtime(t-30*24*3600); return 0; } $ cat t.pl # Perl program doing same thing #!/usr/bin/perl -w use strict; use POSIX qw(); my $time = time; $time = $time - ($time%(24*3600)); my @d0 = localtime($time); print(POSIX::strftime("%F %T %z %Z\n",@d0)); my @d1 = localtime($time-30*24*3600); print(POSIX::strftime("%F %T %z %Z\n",@d1)); __END__ $ ./a.out 2004-11-17 03:00:00 +0300 MSK 2004-10-18 04:00:00 +0400 MSD $ perl -w t.pl 2004-11-17 03:00:00 +0300 MSK 2004-10-18 04:00:00 +0300 MSK $ echo $LANG ru_RU.KOI8-R $ echo $LC_ALL ru_RU.KOI8-R $ Perl's strftime does not provide right timezone offset and name for daylight saving times. C program works correctly (first date is in "winter" time, second in "daylight saving"). >Fix: Unknown. >Release-Note: >Audit-Trail: >Unformatted: