develooper Front page | perl.datetime | Postings from March 2007

Help pulling dst change dates from DateTime::TimeZone

Anthony R. J. Ball
March 5, 2007 09:40
Help pulling dst change dates from DateTime::TimeZone
Message ID:

  I want to be able to grab the actual DST change dates for a timezone
and year. I haven't seen any calls to do this and was looking at writing
my own. I think I see where I can get the data (by following how is_dst
work), but it comes out as spans with the time in seconds. 

  Is there a call to reverse the time in seconds back to a DateTime 
object? Only way I figured out so far is take the DateTime epoch time
in seconds, subtract it from the span and run it through localtime.
There has got to be a better way.


-- - Anthony Ball -
        OSB -
Knowing others is wisdom, knowing yourself is Enlightenment-LAO TZU Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About