sub today_is_24hours { my $now = 60*60*int( time()/60/60 ); # Start of this hour my $hour = ( localtime($now) )[2]; $now -= $hour*60*60; # Start of this day return ( localtime($now) )[8] == ( localtime($now+24*60*60) )[8]; }
(DST never changes twice in a single day.)
- tye
In reply to Re: Is there an official DST border day detection module? (localtime)
by tye
in thread Is there an official DST border day detection module?
by flowdy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |