Perl Monk, Perl Meditation | |
PerlMonks |
timelocal returns time one month ahead - figured it out... sryby nikmit (Sexton) |
on Feb 10, 2017 at 09:44 UTC ( [id://1181642]=perlquestion: print w/replies, xml ) | Need Help?? |
nikmit has asked for the wisdom of the Perl Monks concerning the following question: I am trying to get unix time from a time string, and was (for a second) quite pleased with myself for coming up with
But then it returns Unix time that is one month ahead of what I expected, and the reason is not obvious to me... The docs say timelocal synopsis is $time = timelocal( $sec, $min, $hour, $mday, $mon, $year );I checked and I am feeding it the correct data in the correct order:
What am I missing? Was missing that month range is 0-11...
Back to
Seekers of Perl Wisdom
|
|