Anthony R. J. Ball wrote:
> I want to be able to grab the actual DST change dates for a timezone
>and year.
Some of what I'm doing would benefit from this too. I suggest an addition
to the DT::TZ API:
=head2 $tz->boundary_for_datetime($dt, $which)
Given a C<DateTime> object, this method returns another C<DateTime>
object, in the UTC timezone, which identifies a boundary between
observances in this timezone. Within a single observance, the offset,
short name, DST flag, and any other such attributes, remain constant.
C<$which> specifies which boundary is to be returned. If 0,
the start of the current observance; if +1, the end of the current
observance; if -1, the start of the observance before the current one.
The "current observance" is the one that is in effect at the time
identified by C<$dt>. If there is a boundary exactly at C<$dt>,
then the current observance is the one starting at that instance.
If an observance stretches infinitely far into the past or future,
C<undef> is returned for any non-existent boundary.
I'll do a patch to implement this if no one objects.
-zefram