scoops has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I've found the following answer on how to get the next time transition for a timezone in perl:

http://stackoverflow.com/questions/3246215/how-should-i-determine-next-daylight-saving-time-dst-transition-for-a-timezone

I'm wondering how DateTime::TimeZone keeps its timezone transition data up to date?

Thanks

  • Comment on TimeZone - getting next timezone transition

Replies are listed 'Best First'.
Re: TimeZone - getting next timezone transition
by ikegami (Patriarch) on Jul 26, 2011 at 04:43 UTC

    Are you asking how it keeps your system up to date, or are you asking how it manages to keep track of changes to all the time zones worldwide.

    If you mean the former, it doesn't. It knows on what dates each timezone enters and leaves Daylight Saving Time, but an update of the DateTime-TimeZone distro is required to get the latest definitions. For example, when the definition of US's time zones changed a few years ago, you would have had to update the distro for it to handle then-future dates correctly. Take a peek at its Changes file to see what I mean.

    If you mean the latter, it gets its data from the Olson database.

    Update: Major rewrite to improve clarity.

Re: TimeZone - getting next timezone transition
by Jim (Curate) on Jul 26, 2011 at 16:50 UTC