Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Timelocal, Localtime Bug?

by Riales (Hermit)
on Mar 29, 2012 at 22:16 UTC ( #962493=note: print w/ replies, xml ) Need Help??


in reply to Timelocal, Localtime Bug?

This is from the documentation on Time::Local:

$time = timelocal($sec,$min,$hour,$mday,$mon,$year);

It looks like you're putting $month where $hour is supposed to go?

EDIT: Nevermind, it looks like you're consistently checking the hours anyways. The 3 instead of 2 makes me think that it has something to do with DST (2 AM doesn't exist because we spring forward to 3 AM in the spring). Still, it doesn't happen on March 1st, so this doesn't seem quite correct...


Comment on Re: Timelocal, Localtime Bug?
Select or Download Code
Re^2: Timelocal, Localtime Bug?
by alanonymous (Sexton) on Mar 29, 2012 at 22:20 UTC
    Sorry, I fixed the code chunk. I took it from my other machine and had fat fingers (mixing up localtime and timelocal...), so now with the code that's posted, the bug appears.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962493]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-04 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls