On Sunday, October 31, 2010 15:26:04 Guustaaf Damave wrote:
> Is there a way to retrieve the next switchover time for a time zone? I
> could then store that in the cache and stop using that cache entry after
> that time, similar to how web browsers do that.

Your best bet is probably finding a way to query the TZ database directly to 
get this information. The C library calls don't directly support looking up 
the switchover so this might not be real easy to do. You can probably pull 
up the data from the raw or compiled zoneinfo files.

http://en.wikipedia.org/wiki/Tz_database

Some APIs exist for this in DateTime:

http://search.cpan.org/dist/DateTime-
TimeZone/lib/DateTime/TimeZone/OlsonDB.pm

But one of the sentences in the docs says:

USAGE-- Not yet documented. This stuff is a mess.

> Thanks again!
> Best regards,
> Guustaaf

Regards,
Matthew Hall

Reply via email to