Returns a boolean indicating whether or not this object represents a
floating time zone, as defined by RFC 2445.
=head2 $tz->is_utc
Indicates whether or not this object represents the UTC (GMT) time
zone.
=head2 $tz->has_dst_changes
Indicates whether or not this zone has I<ever> had a change to and
from DST, either in the past or future.
=head2 $tz->is_olson
Returns true if the time zone is a named time zone from the Olson
database.
=head2 $tz->category
Returns the part of the time zone name before the first slash. For
example, the "America/Chicago" time zone would return "America".
=head2 DateTime::TimeZone->is_valid_name($name)
Given a string, this method returns a boolean value indicating whether
or not the string is a valid time zone name. If you are using
C<DateTime::TimeZone::Alias>, any aliases you've created will be valid.
=head2 DateTime::TimeZone->all_names
This returns a pre-sorted list of all the time zone names. This list
does not include link names. In scalar context, it returns an array
reference, while in list context it returns an array.
=head2 DateTime::TimeZone->categories
This returns a list of all time zone categories. In scalar context,
it returns an array reference, while in list context it returns an
array.
=head2 DateTime::TimeZone->links
This returns a hash of all time zone links, where the keys are the
old, deprecated names, and the values are the new names. In scalar
context, it returns a hash reference, while in list context it returns
a hash.
=head2 DateTime::TimeZone->names_in_category( $category )
Given a valid category, this method returns a list of the names in
that category, without the category portion. So the list for the
"America" category would include the strings "Chicago",
"Kentucky/Monticello", and "New_York". In scalar context, it returns
an array reference, while in list context it returns an array.
The list is returned in order of population by zone, which should mean
that this order will be the best to use for most UIs.
=head2 DateTime::TimeZone->countries()
Returns a sorted list of all the valid country codes (in lower-case)
which can be passed to C<names_in_country()>. In scalar context, it
returns an array reference, while in list context it returns an array.
If you need to convert country codes to names or vice versa you can
use C<Locale::Country> to do so.
=head2 DateTime::TimeZone->names_in_country( $country_code )
Given a two-letter ISO3066 country code, this method returns a list of
time zones used in that country. The country code may be of any
case. In scalar context, it returns an array reference, while in list
context it returns an array.
=head2 DateTime::TimeZone->offset_as_seconds( $offset )
Given an offset as a string, this returns the number of seconds
represented by the offset as a positive or negative number. Returns
C<undef> if $offset is not in the range C<-99:59:59> to C<+99:59:59>.
The offset is expected to match either
C</^([\+\-])?(\d\d?):(\d\d)(?::(\d\d))?$/> or
C</^([\+\-])?(\d\d)(\d\d)(\d\d)?$/>. If it doesn't match either of
these, C<undef> will be returned.
This means that if you want to specify hours as a single digit, then
each element of the offset must be separated by a colon (:).
=head2 DateTime::TimeZone->offset_as_string( $offset )
Given an offset as a number, this returns the offset as a string.
Returns C<undef> if $offset is not in the range C<-359999> to C<359999>.
=head2 Storable Hooks
This module provides freeze and thaw hooks for C<Storable> so that the
huge data structures for Olson time zones are not actually stored in
the serialized structure.
=8= |