in reply to Re: Is there an official DST border day detection module? (localtime)
in thread Is there an official DST border day detection module?
thanks to you a lot. As I want to get amount of hours in the day, I tried to modify your suggestion to:
sub hours_in_day { my $now = 60*60*int( shift()/60/60 ); # Start of this hour my $hour = ( localtime($now) )[2]; $now -= $hour*60*60; # Start of this day $hour = ( localtime($now+24*60*60) )[2]; $hour -= 24 if int($hour/12); return 24-$hour; }
But it is not working, hm ...
Thinking & probing,
flowdy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Is there an official DST border day detection module? (localtime)
by hippo (Archbishop) on Oct 28, 2014 at 11:08 UTC |