alanonymous has asked for the wisdom of the Perl Monks concerning the following question:
use Time::Local; my $hour= 2; my $test = timelocal(0,0,$hour,1,3,2012); my @test2 = localtime($test); print "hour $hour vs $test2[2]\n";
If I run this identical code under perl 5.8.7, it outputs:hour 2 vs 2
use Time::Local; my $hour= 2; my $test = timelocal(0,0,$hour,1,3,2012); my @test2 = localtime($test); print "hour $hour vs $test2[2]\n";
If I run this 2011 modified code under 5.8.7, it outputs:hour 2 vs 3
use Time::Local; my $hour= 2; my $test = timelocal(0,0,$hour,1,3,2011); my @test2 = localtime($test); print "hour $hour vs $test2[2]\n";
Am I going crazy? What is going on?!? AHhhh!hour 2 vs 2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Timelocal, Localtime Bug?
by JavaFan (Canon) on Mar 29, 2012 at 23:32 UTC | |
by alanonymous (Sexton) on Mar 29, 2012 at 23:54 UTC | |
by JavaFan (Canon) on Mar 30, 2012 at 08:00 UTC | |
by alanonymous (Sexton) on Apr 03, 2012 at 04:52 UTC | |
by Anonymous Monk on Mar 29, 2012 at 23:57 UTC | |
|
Re: Timelocal, Localtime Bug?
by jwkrahn (Abbot) on Mar 29, 2012 at 21:53 UTC | |
by Riales (Hermit) on Mar 29, 2012 at 22:10 UTC | |
by alanonymous (Sexton) on Mar 29, 2012 at 22:18 UTC | |
|
Re: Timelocal, Localtime Bug?
by Riales (Hermit) on Mar 29, 2012 at 22:16 UTC | |
by alanonymous (Sexton) on Mar 29, 2012 at 22:20 UTC | |
|
Re: Timelocal, Localtime Bug?
by thundergnat (Deacon) on Mar 30, 2012 at 14:29 UTC | |
by alanonymous (Sexton) on Mar 31, 2012 at 04:58 UTC |