DateTime-TimeZone
    
    
  
  
  
view release on metacpan or search on metacpan
When loading a time zone from the Olson database, the constructor checks the
version of the loaded class to make sure it matches the version of the current
DateTime::TimeZone installation. If they do not match it will issue a warning.
This is useful because time zone names may fall out of use, but you may have an
old module file installed for that time zone.
There are also several special values that can be given as names.
If the "name" parameter is "floating", then a `DateTime::TimeZone::Floating`
object is returned.  A floating time zone does not have _any_ offset, and is
always the same time.  This is useful for calendaring applications, which may
need to specify that a given event happens at the same _local_ time,
regardless of where it occurs. See [RFC
2445](https://www.ietf.org/rfc/rfc2445.txt) for more details.
If the "name" parameter is "UTC", then a `DateTime::TimeZone::UTC` object is
returned.
If the "name" is an offset string, it is converted to a number, and a
`DateTime::TimeZone::OffsetOnly` object is returned.
lib/DateTime/TimeZone.pm view on Meta::CPAN
When loading a time zone from the Olson database, the constructor checks the
version of the loaded class to make sure it matches the version of the current
DateTime::TimeZone installation. If they do not match it will issue a warning.
This is useful because time zone names may fall out of use, but you may have an
old module file installed for that time zone.
There are also several special values that can be given as names.
If the "name" parameter is "floating", then a C<DateTime::TimeZone::Floating>
object is returned.  A floating time zone does not have I<any> offset, and is
always the same time.  This is useful for calendaring applications, which may
need to specify that a given event happens at the same I<local> time,
regardless of where it occurs. See L<RFC
2445|https://www.ietf.org/rfc/rfc2445.txt> for more details.
If the "name" parameter is "UTC", then a C<DateTime::TimeZone::UTC> object is
returned.
If the "name" is an offset string, it is converted to a number, and a
C<DateTime::TimeZone::OffsetOnly> object is returned.
lib/DateTime/TimeZone/OlsonDB/Observance.pm view on Meta::CPAN
    );
    my %rules_by_month;
    for my $rule (@rules) {
        push @{ $rules_by_month{ $rule->month() } }, $rule;
    }
    # In some cases we have both a "max year" rule and a "this year" rule for
    # a given month's change. In that case, we want to pick the more specific
    # ("this year") rule, not apply both. This only matters for zones that
    # have a winter transition that follows the Islamic calendar to deal with
    # Ramadan. So far this has happened with Cairo, El_Aaiun, and other zones
    # in northern Africa.
    my @final_rules;
    for my $month ( sort { $a <=> $b } keys %rules_by_month ) {
        push @final_rules, @{ $rules_by_month{$month} };
    }
    return @final_rules;
}
( run in 0.437 second using v1.01-cache-2.11-cpan-5dc5da66d9d )