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: 17100
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Time-Local

People
Owner: Nobody in particular
Requestors: ron [...] savage.net.au
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.12
Fixed in: 1.12_01



Subject: Various 'nmake test' problems
(1) Start: Tue Jan 17 11:46:23 2006. Installing Time::Local V 1.12 Command: gunzip Time-Local-1.12.tgz (Time passes) Command: nmake test Output: D:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/Local....FAILED test 133 Failed 1/133 tests, 99.25% okay (less 26 skipped tests: 106 okay, 79.70%) Failed Test Stat Wstat Total Fail Failed List of Failed ----------------------------------------------------------------------- -------- t/Local.t 133 1 0.75% 133 26 subtests skipped. Errors: Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in integer multiplication (*) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in integer multiplication (*) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 \blib\lib/Time/Local.pm line 75. Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 \blib\lib/Time/Local.pm line 75. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 77. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 75. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in integer multiplication (*) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in integer multiplication (*) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 \blib\lib/Time/Local.pm line 75. Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 \blib\lib/Time/Local.pm line 75. Use of uninitialized value in integer addition (+) at D:\perl- modules\Time-Local-1.12\blib\lib/Time/Local.pm line 75. # Test 133 got: "8001d00d" (t/Local.t at line 167) # Expected: "7fffffff" (0x7fffffff round trip through localtime then timelocal) # t/Local.t line 167 is: ok(sprintf('%x', timelocal(localtime (0x7fffffff))), sprintf('%x', 0x7fffffff), Failed 1/1 test scripts, 0.00% okay. 1/133 subtests failed, 99.25% okay. NMAKE : fatal error U1077: 'D:\Perl\bin\perl.exe' : return code '0xff' Stop. (2) D:\perl-modules>perl -v This is perl, v5.8.7 built for MSWin32-x86-multi-thread (with 7 registered patches, see perl -V for more detail) (3) WinXP SP2
Same error for: This is perl, v5.8.6 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail) Binary build 811 provided by ActiveState Corp # Test 145 got: "80002a2d" (t\Local.t at line 167) # Expected: "7fffffff" (0x7fffffff round trip through localtime then timelocal) # t\Local.t line 167 is: ok(sprintf('%x', timelocal(localtime(0x7fffffff))), sprintf('%x', 0x7fffffff), But Time-Local-1.10 works ok for all tests. So the fix is: Re-add the one-day delta to avoid localtime overflow. # Calculate first guess with a one-day delta to avoid localtime overflow my $delta = ($_[5] < 100)? 86400 : -86400; my $loc_t = _timegm(localtime( $ref_t + $delta )) - $delta; On Mon Jan 16 20:01:46 2006, guest wrote: Show quoted text
> (1) > Start: Tue Jan 17 11:46:23 2006. > Installing Time::Local V 1.12 > Command: gunzip Time-Local-1.12.tgz > (Time passes) > Command: nmake test > > Output: > D:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "- > e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t > t/Local....FAILED test 133 > Failed 1/133 tests, 99.25% okay (less 26 skipped tests: 106 > okay, 79.70%) > Failed Test Stat Wstat Total Fail Failed List of Failed > ----------------------------------------------------------------------- > -------- > t/Local.t 133 1 0.75% 133 > 26 subtests skipped. > > Errors: > > Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 > Copyright (C) Microsoft Corp 1988-1998. All rights reserved. > > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in integer multiplication (*) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in integer multiplication (*) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 > \blib\lib/Time/Local.pm line 75. > Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 > \blib\lib/Time/Local.pm line 75. > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 76. > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 77. > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 75. > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in integer multiplication (*) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in integer multiplication (*) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 84. > Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 > \blib\lib/Time/Local.pm line 75. > Use of uninitialized value in pack at D:\perl-modules\Time-Local-1.12 > \blib\lib/Time/Local.pm line 75. > Use of uninitialized value in integer addition (+) at D:\perl- > modules\Time-Local-1.12\blib\lib/Time/Local.pm line 75. > # Test 133 got: "8001d00d" (t/Local.t at line 167) > # Expected: "7fffffff" (0x7fffffff round trip through localtime > then timelocal) > # t/Local.t line 167 is: ok(sprintf('%x', timelocal(localtime > (0x7fffffff))), sprintf('%x', 0x7fffffff), > Failed 1/1 test scripts, 0.00% okay. 1/133 subtests failed, 99.25% > okay. > NMAKE : fatal error U1077: 'D:\Perl\bin\perl.exe' : return code '0xff' > Stop. > > (2) > D:\perl-modules>perl -v > > This is perl, v5.8.7 built for MSWin32-x86-multi-thread > (with 7 registered patches, see perl -V for more detail) > > (3) > WinXP SP2
-- http://xarch.tu-graz.ac.at/home/rurban/
2006-02-14 13:31:54 rurban * fix test 145 (0x7fffffff round trip through localtime then timelocal) --- Time-Local-1.12/lib/Time/Local.pm.orig 2005-12-18 20:14:02.000000000 +0100 +++ Time-Local-1.12/lib/Time/Local.pm 2006-02-14 13:30:55.975625000 +0100 @@ -162,7 +162,9 @@ local ($Min{Day}, $Min{Sec}) = _zoneadjust($Min{Day}, $Min{Sec}, $MinInt); my $ref_t = &timegm; - my $loc_t = _timegm(localtime($ref_t)); + # Calculate first guess with a one-day delta to avoid localtime overflow + my $delta = ($_[5] < 100)? 86400 : -86400; + my $loc_t = _timegm(localtime( $ref_t + $delta )) - $delta; # Is there a timezone offset from GMT or are we done my $zone_off = $ref_t - $loc_t
Subject: Re: [rt.cpan.org #17100] Various 'nmake test' problems
Date: Wed, 15 Feb 2006 10:03:05 +1100
To: Reini_Urban via RT <bug-Time-Local [...] rt.cpan.org>
From: Ron Savage <ron [...] savage.net.au>
On Tue, 14 Feb 2006 07:29:11 -0500 (EST), Reini_Urban via RT wrote: Hi Yes, that patch worked for me: C:\perl-modules\Time-Local-1.12>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/*.t t/Local....ok 26/133 skipped: All tests successful, 26 subtests skipped. Files=1, Tests=133, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) $many x $thanx; -- Cheers Ron Savage, ron@savage.net.au on 15/02/2006 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company