Hi all
I filed this bug last week and Dave Rolsky advised me to post here to
explain what I was trying to do:
Bug #59405 for DateTime-TimeZone: Undocumented _rules attribute
(https://rt.cpan.org/Public/Bug/Display.html?id=59405)
To start from the beginning, I've been using the DT and DT:TZ modules
for a world clock and want to add a feature which displays the time,
date and effect of the next DST transition (if any) for each location.
The modules seem to allow me to do anything I could possibly imagine
with times and time zones, except this. I realise I could test whether
each location is on DST for every hour from now until 6 months ahead,
but was hoping that there was a more elegant way of determining when the
transition is.
Asking around, I was advised that the _rules attribute of an
DateTime::TimeZone object returns an array of
DateTime::TimeZone::OlsonDB::Rule objects which encode the start
and end of DST observances.
However, I'm now understanding from Dave's response to the bug that the
_rules attribute neither is nor should be used for this purpose.
Any advice welcomed. Please bear in mind I'm a Perl beginner (I'm only
using it due to the existence of these modules!) so apologies for any
misunderstanding.
cheers
Elliot