Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Time-Local CPAN distribution.

Report information
The Basics
Id: 7231
Status: resolved
Priority: 0/
Queue: Time-Local

People
Owner: DROLSKY [...] cpan.org
Requestors: ron [...] savage.net.au
rsav [...] deakin.edu.au
wim.nelis [...] inter.nl.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.10
Fixed in: 1.11



Subject: Test failures for V 1.10 under Perl 5.8.4 & WinXP
1 of 2 This is context, copied from my bug report for Archive::Zip, which proved to be a problem with Time::Local: Show quoted text
> After running 'nmake' I tried t/test.t. > Note: Local time is wrong. It is actually 11:15:15. > > C:\perl-modules\Archive-Zip-1.12_03>perl t/test.t > 1..123 > # Running under perl version 5.008004 for MSWin32 > # Win32::BuildNumber 810 > # Current time local: Tue Aug 3 01:15:15 2004 > # Current time GMT: Tue Aug 3 01:15:15 2004 > # Using Test.pm version 1.25
[snip] This problem of the very first call to display time being wrong has been a bug in 'Perl/a time module' for a long time. My apologies for not reporting it earlier. 2 of 2 This is the report for Time::Local: C:\perl-modules\Time-Local-1.10>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Skip blib\lib\Time\Local.pm (unchanged) C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\ arch')" t\Local.t t\Local....Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.1 0\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 68. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 69. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 12/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. t\Local....ok 20/102Use of uninitialized value in integer addition (+) at C:\perl-modules\Time- Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. t\Local....ok 24/102Use of uninitialized value in integer addition (+) at C:\perl-modules\Time- Local-1.10\blib\lib/Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 36/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 48/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 60/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 72/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 84/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 96/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 97/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 99/102Use of uninitialized value in integer multiplication (*) at C:\perl-modules \Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 76. t\Local....ok 101/102Use of uninitialized value in integer multiplication (*) at C:\perl-module s\Time-Local-1.10\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:\perl-modules\Time-Local-1.10\bli b\lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in pack at C:\perl-modules\Time-Local-1.10\blib\lib/Time/Local.pm li ne 67. Use of uninitialized value in integer addition (+) at C:\perl-modules\Time-Local-1.10\blib\lib/ Time/Local.pm line 67. t\Local....ok All tests successful. Files=1, Tests=102, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
[guest - Mon Aug 2 23:12:44 2004]: Show quoted text
> t\Local....ok > All tests successful. > Files=1, Tests=102, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 > CPU)
That's really odd. Despite all the warnings, which I would think would indicate real problems, all the tests still pass. What does this print out on your system? perl -le 'print "@{[gmtime(0)]}"'
From: aa29 [...] mail.ru
Show quoted text
> That's really odd. Despite all the warnings, which I would think > would > indicate real problems, all the tests still pass. > > What does this print out on your system? > > perl -le 'print "@{[gmtime(0)]}"'
I have just the same problem (Perl 5.8.5/WinXP/Time::Local 1.10). D:\>perl -le "print \"@{[gmtime(0)]}\"" 0 0 0 1 0 70 4 0 0 D:\>perl -MTime::Local -we "timelocal(localtime)" Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:/Perl/lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:/Perl/lib/Time/Local.pm line 76. Use of uninitialized value in pack at C:/Perl/lib/Time/Local.pm line 67. Use of uninitialized value in pack at C:/Perl/lib/Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 68. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 69. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 67.
[ron@savage.net.au - Thu Nov 4 17:03:48 2004]: Show quoted text
> On Thu, 9 Sep 2004 09:28:16 -0400 (EDT), via RT wrote: > > Hi Dave > > I've worked out what this error is due to: > > C:\Perl-modules\Time-Local-1.10>nmake test > > Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 > Copyright (C) Microsoft Corp 1988-1998. All rights reserved. > > Skip blib\lib\Time\Local.pm (unchanged) > C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'bl > ib\lib', 'blib\arch')" t\Local.t > t\Local....Use of uninitialized value in integer addition (+) at > C:\Perl-modules > \Time-Local-1.10\blib\lib/Time/Local.pm line 76. > etc > > Change file 152 of Local.pm from: > local ($Min{Day}, $Min{Sec}) = _zoneadjust($Min{Day}, $Min{Sec}, > $MinInt); > to > local ($Min{Day}, $Min{Sec}) = _zoneadjust($Min{Day}, $Min{Sec}, > 0); > and all the uninitialized warnings are fixed. > It's clear the minimum value acceptable to localtime is 0, not min > int.
I added some code to check if epochs less than zero are supported, even when time_t is signed. It passes all tests cleanly on Win32, but I'm waiting to see if I can get testers from other platforms before releasing.
Subject: Warnings when using Time::Local, timelocal
After installing ActivePerl 5.8.6, build 811, on Win 98SE, the function timelocal in Time::Local gives warning messages. Using the following test program: use strict ; use Time::Local ; my $Now= time ; my @Now= (localtime($Now))[0..5] ; print "Current time is ", join(".",reverse @Now), "\n" ; my $Nu = timelocal( @Now ) ; print " UTS in = $Now\n" ; print " UTS out= $Nu\n" ; Running this program in an MSDOS box gives the following output: C:\>perl -w test.pl Current time is 105.0.23.8.24.55 Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at C:/Perl/lib/Time/Loc al.pm line 76. Use of uninitialized value in integer multiplication (*) at C:/Perl/lib/Time/Loc al.pm line 76. Use of uninitialized value in pack at C:/Perl/lib/Time/Local.pm line 67. Use of uninitialized value in pack at C:/Perl/lib/Time/Local.pm line 67. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 68. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 69. Use of uninitialized value in integer addition (+) at C:/Perl/lib/Time/Local.pm line 67. UTS in = 1106465095 UTS out= 1106465095 After installing Time::Local version 1.06, taken from ActivePerl 5.8.4, no warning messages are shown. Kind regards, Wim Nelis.