# This file is auto-generated by the Perl DateTime Suite time zone
# code generator (0.01) This code generator comes with the
# DateTime::TimeZone module distribution in the tools/ directory
#
# Generated from McMurdo.
#
# Do not edit this file directly.
#
package DateTime::TimeZone::Antarctica::McMurdo;

use strict;

use Class::Singleton;
use DateTime::TimeZone;
use DateTime::TimeZone::OlsonDB;

@DateTime::TimeZone::Antarctica::McMurdo::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );

my $spans =
[
  {
    'short_name' => 'zzz',
    'utc_end' => '61693833600',
    'utc_start' => $DateTime::TimeZone::NEG_INFINITY,
    'local_end' => '61693833600',
    'offset' => '0',
    'local_start' => '-inf'
  },
  {
    'short_name' => 'NZT',
    'utc_end' => '62319160800',
    'utc_start' => '61693833600',
    'local_end' => '62319204000',
    'offset' => 43200,
    'local_start' => '61693876800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62330648400',
    'utc_start' => '62319160800',
    'local_end' => '62330695200',
    'offset' => 46800,
    'local_start' => '62319207600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62351215200',
    'utc_start' => '62330648400',
    'local_end' => '62351258400',
    'offset' => 43200,
    'local_start' => '62330691600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62362098000',
    'utc_start' => '62351215200',
    'local_end' => '62362144800',
    'offset' => 46800,
    'local_start' => '62351262000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62382664800',
    'utc_start' => '62362098000',
    'local_end' => '62382708000',
    'offset' => 43200,
    'local_start' => '62362141200'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62393547600',
    'utc_start' => '62382664800',
    'local_end' => '62393594400',
    'offset' => 46800,
    'local_start' => '62382711600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62414114400',
    'utc_start' => '62393547600',
    'local_end' => '62414157600',
    'offset' => 43200,
    'local_start' => '62393590800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62424997200',
    'utc_start' => '62414114400',
    'local_end' => '62425044000',
    'offset' => 46800,
    'local_start' => '62414161200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62445564000',
    'utc_start' => '62424997200',
    'local_end' => '62445607200',
    'offset' => 43200,
    'local_start' => '62425040400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62456446800',
    'utc_start' => '62445564000',
    'local_end' => '62456493600',
    'offset' => 46800,
    'local_start' => '62445610800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62477013600',
    'utc_start' => '62456446800',
    'local_end' => '62477056800',
    'offset' => 43200,
    'local_start' => '62456490000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62487896400',
    'utc_start' => '62477013600',
    'local_end' => '62487943200',
    'offset' => 46800,
    'local_start' => '62477060400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62508463200',
    'utc_start' => '62487896400',
    'local_end' => '62508506400',
    'offset' => 43200,
    'local_start' => '62487939600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62519950800',
    'utc_start' => '62508463200',
    'local_end' => '62519997600',
    'offset' => 46800,
    'local_start' => '62508510000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62540517600',
    'utc_start' => '62519950800',
    'local_end' => '62540560800',
    'offset' => 43200,
    'local_start' => '62519994000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62551400400',
    'utc_start' => '62540517600',
    'local_end' => '62551447200',
    'offset' => 46800,
    'local_start' => '62540564400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62571967200',
    'utc_start' => '62551400400',
    'local_end' => '62572010400',
    'offset' => 43200,
    'local_start' => '62551443600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62582850000',
    'utc_start' => '62571967200',
    'local_end' => '62582896800',
    'offset' => 46800,
    'local_start' => '62572014000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62603416800',
    'utc_start' => '62582850000',
    'local_end' => '62603460000',
    'offset' => 43200,
    'local_start' => '62582893200'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62614299600',
    'utc_start' => '62603416800',
    'local_end' => '62614346400',
    'offset' => 46800,
    'local_start' => '62603463600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62634866400',
    'utc_start' => '62614299600',
    'local_end' => '62634909600',
    'offset' => 43200,
    'local_start' => '62614342800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62645749200',
    'utc_start' => '62634866400',
    'local_end' => '62645796000',
    'offset' => 46800,
    'local_start' => '62634913200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62666316000',
    'utc_start' => '62645749200',
    'local_end' => '62666359200',
    'offset' => 43200,
    'local_start' => '62645792400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62677198800',
    'utc_start' => '62666316000',
    'local_end' => '62677245600',
    'offset' => 46800,
    'local_start' => '62666362800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62697765600',
    'utc_start' => '62677198800',
    'local_end' => '62697808800',
    'offset' => 43200,
    'local_start' => '62677242000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62709253200',
    'utc_start' => '62697765600',
    'local_end' => '62709300000',
    'offset' => 46800,
    'local_start' => '62697812400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62773365600',
    'utc_start' => '62709253200',
    'local_end' => '62773408800',
    'offset' => 43200,
    'local_start' => '62709296400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62790904800',
    'utc_start' => '62773365600',
    'local_end' => '62790948000',
    'offset' => 43200,
    'local_start' => '62773408800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62804811600',
    'utc_start' => '62790904800',
    'local_end' => '62804858400',
    'offset' => 46800,
    'local_start' => '62790951600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62822354400',
    'utc_start' => '62804811600',
    'local_end' => '62822397600',
    'offset' => 43200,
    'local_start' => '62804854800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62836261200',
    'utc_start' => '62822354400',
    'local_end' => '62836308000',
    'offset' => 46800,
    'local_start' => '62822401200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62853804000',
    'utc_start' => '62836261200',
    'local_end' => '62853847200',
    'offset' => 43200,
    'local_start' => '62836304400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62868315600',
    'utc_start' => '62853804000',
    'local_end' => '62868362400',
    'offset' => 46800,
    'local_start' => '62853850800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62885253600',
    'utc_start' => '62868315600',
    'local_end' => '62885296800',
    'offset' => 43200,
    'local_start' => '62868358800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62899765200',
    'utc_start' => '62885253600',
    'local_end' => '62899812000',
    'offset' => 46800,
    'local_start' => '62885300400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62916703200',
    'utc_start' => '62899765200',
    'local_end' => '62916746400',
    'offset' => 43200,
    'local_start' => '62899808400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62931214800',
    'utc_start' => '62916703200',
    'local_end' => '62931261600',
    'offset' => 46800,
    'local_start' => '62916750000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62948152800',
    'utc_start' => '62931214800',
    'local_end' => '62948196000',
    'offset' => 43200,
    'local_start' => '62931258000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62962664400',
    'utc_start' => '62948152800',
    'local_end' => '62962711200',
    'offset' => 46800,
    'local_start' => '62948199600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '62980207200',
    'utc_start' => '62962664400',
    'local_end' => '62980250400',
    'offset' => 43200,
    'local_start' => '62962707600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '62994114000',
    'utc_start' => '62980207200',
    'local_end' => '62994160800',
    'offset' => 46800,
    'local_start' => '62980254000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63011656800',
    'utc_start' => '62994114000',
    'local_end' => '63011700000',
    'offset' => 43200,
    'local_start' => '62994157200'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63025563600',
    'utc_start' => '63011656800',
    'local_end' => '63025610400',
    'offset' => 46800,
    'local_start' => '63011703600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63043106400',
    'utc_start' => '63025563600',
    'local_end' => '63043149600',
    'offset' => 43200,
    'local_start' => '63025606800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63057618000',
    'utc_start' => '63043106400',
    'local_end' => '63057664800',
    'offset' => 46800,
    'local_start' => '63043153200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63074556000',
    'utc_start' => '63057618000',
    'local_end' => '63074599200',
    'offset' => 43200,
    'local_start' => '63057661200'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63089067600',
    'utc_start' => '63074556000',
    'local_end' => '63089114400',
    'offset' => 46800,
    'local_start' => '63074602800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63106005600',
    'utc_start' => '63089067600',
    'local_end' => '63106048800',
    'offset' => 43200,
    'local_start' => '63089110800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63120517200',
    'utc_start' => '63106005600',
    'local_end' => '63120564000',
    'offset' => 46800,
    'local_start' => '63106052400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63138060000',
    'utc_start' => '63120517200',
    'local_end' => '63138103200',
    'offset' => 43200,
    'local_start' => '63120560400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63151966800',
    'utc_start' => '63138060000',
    'local_end' => '63152013600',
    'offset' => 46800,
    'local_start' => '63138106800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63169509600',
    'utc_start' => '63151966800',
    'local_end' => '63169552800',
    'offset' => 43200,
    'local_start' => '63152010000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63183416400',
    'utc_start' => '63169509600',
    'local_end' => '63183463200',
    'offset' => 46800,
    'local_start' => '63169556400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63200959200',
    'utc_start' => '63183416400',
    'local_end' => '63201002400',
    'offset' => 43200,
    'local_start' => '63183459600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63215470800',
    'utc_start' => '63200959200',
    'local_end' => '63215517600',
    'offset' => 46800,
    'local_start' => '63201006000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63232408800',
    'utc_start' => '63215470800',
    'local_end' => '63232452000',
    'offset' => 43200,
    'local_start' => '63215514000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63246920400',
    'utc_start' => '63232408800',
    'local_end' => '63246967200',
    'offset' => 46800,
    'local_start' => '63232455600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63263858400',
    'utc_start' => '63246920400',
    'local_end' => '63263901600',
    'offset' => 43200,
    'local_start' => '63246963600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63278370000',
    'utc_start' => '63263858400',
    'local_end' => '63278416800',
    'offset' => 46800,
    'local_start' => '63263905200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63295308000',
    'utc_start' => '63278370000',
    'local_end' => '63295351200',
    'offset' => 43200,
    'local_start' => '63278413200'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63309819600',
    'utc_start' => '63295308000',
    'local_end' => '63309866400',
    'offset' => 46800,
    'local_start' => '63295354800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63327362400',
    'utc_start' => '63309819600',
    'local_end' => '63327405600',
    'offset' => 43200,
    'local_start' => '63309862800'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63341269200',
    'utc_start' => '63327362400',
    'local_end' => '63341316000',
    'offset' => 46800,
    'local_start' => '63327409200'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63358812000',
    'utc_start' => '63341269200',
    'local_end' => '63358855200',
    'offset' => 43200,
    'local_start' => '63341312400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63372718800',
    'utc_start' => '63358812000',
    'local_end' => '63372765600',
    'offset' => 46800,
    'local_start' => '63358858800'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63390261600',
    'utc_start' => '63372718800',
    'local_end' => '63390304800',
    'offset' => 43200,
    'local_start' => '63372762000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63404773200',
    'utc_start' => '63390261600',
    'local_end' => '63404820000',
    'offset' => 46800,
    'local_start' => '63390308400'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63421711200',
    'utc_start' => '63404773200',
    'local_end' => '63421754400',
    'offset' => 43200,
    'local_start' => '63404816400'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63436222800',
    'utc_start' => '63421711200',
    'local_end' => '63436269600',
    'offset' => 46800,
    'local_start' => '63421758000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63453160800',
    'utc_start' => '63436222800',
    'local_end' => '63453204000',
    'offset' => 43200,
    'local_start' => '63436266000'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63467672400',
    'utc_start' => '63453160800',
    'local_end' => '63467719200',
    'offset' => 46800,
    'local_start' => '63453207600'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63485215200',
    'utc_start' => '63467672400',
    'local_end' => '63485258400',
    'offset' => 43200,
    'local_start' => '63467715600'
  },
  {
    'short_name' => 'NZDT',
    'utc_end' => '63499122000',
    'utc_start' => '63485215200',
    'local_end' => '63499168800',
    'offset' => 46800,
    'local_start' => '63485262000'
  },
  {
    'short_name' => 'NZST',
    'utc_end' => '63516664800',
    'utc_start' => '63499122000',
    'local_end' => '63516708000',
    'offset' => 43200,
    'local_start' => '63499165200'
  }
]
;

sub _new_instance
{
    return shift->_init( @_, spans => $spans );
}

my $rules = [
  bless( {
    'letter' => 'D',
    'on' => 'Sun>=1',
    'save' => '1:00',
    'to' => 'max',
    'from' => '1990',
    'in' => 'Oct',
    'at' => '2:00s',
    'type' => undef,
    'offset' => 3600
  }, 'DateTime::TimeZone::OlsonDB::Rule' ),
  bless( {
    'letter' => 'S',
    'on' => 'Sun>=15',
    'save' => '0',
    'to' => 'max',
    'from' => '1990',
    'in' => 'Mar',
    'at' => '2:00s',
    'type' => undef,
    'offset' => 0
  }, 'DateTime::TimeZone::OlsonDB::Rule' )
]
;
my $last_observance = bless( {
  'until' => undef,
  'format' => 'NZ%sT',
  'gmtoff' => '12:00',
  'rules' => 'NZAQ',
  'offset' => 43200,
  'start' => bless( {
    'local_rd_secs' => 0,
    'c' => {
      'hour' => 0,
      'minute' => 0,
      'second' => 0,
      'month' => 1,
      'day_of_year' => 1,
      'day_of_week' => 7,
      'day' => 1,
      'year' => 1956
    },
    'local_rd_days' => 714049,
    'language' => bless( {
      'month_numbers' => {},
      'am_pm' => [
        'AM',
        'PM'
      ],
      'ordinal_suffixes' => [],
      'month_abbreviations' => [
        'Jan',
        'Feb',
        'Mar',
        'Apr',
        'May',
        'Jun',
        'Jul',
        'Aug',
        'Sep',
        'Oct',
        'Nov',
        'Dec'
      ],
      'day_abbreviations' => [
        'Mon',
        'Tue',
        'Wed',
        'Thu',
        'Fri',
        'Sat',
        'Sun'
      ],
      'month_names' => [
        'January',
        'February',
        'March',
        'April',
        'May',
        'June',
        'July',
        'August',
        'September',
        'October',
        'November',
        'December'
      ],
      'day_numbers' => {},
      'day_names' => [
        'Monday',
        'Tuesday',
        'Wednesday',
        'Thursday',
        'Friday',
        'Saturday',
        'Sunday'
      ]
    }, 'DateTime::Language::English' ),
    'tz' => bless( {}, 'DateTime::TimeZone::UTC' ),
    'utc_rd_secs' => 0,
    'utc_rd_days' => 714049
  }, 'DateTime' )
}, 'DateTime::TimeZone::OlsonDB::Observance' )
;

sub _generate_spans_until_match
{
    my $self = shift;
    my $dt = shift;

    my @changes;
    foreach my $rule (@$rules)
    {
        my $year = $dt->year;

        my $next = $rule->date_for_year( $year, 43200 );

        # don't bother with changes we've seen already
        next if $next->{utc}->utc_rd_as_seconds < $self->{max_span}{utc_end};

        push @changes,
            DateTime::TimeZone::OlsonDB::Change->new
                ( start_date => $next->{local},
                  short_name =>
                  sprintf( $last_observance->format, $rule->letter ),
                  observance => $last_observance,
                  rule       => $rule,
                );

        next unless $next->{utc} < $dt;

        $next = $rule->date_for_year( $year + 1, 43200 );

        push @changes,
            DateTime::TimeZone::OlsonDB::Change->new
                ( start_date => $next->{local},
                  short_name =>
                  sprintf( $last_observance->format, $rule->letter ),
                  observance => $last_observance,
                  rule       => $rule,
                );
    }

    my @sorted = sort { $a->start_date <=> $b->start_date } @changes;

    my $seconds = $dt->utc_rd_as_seconds;
    my $match;

    for ( my $x = 1; $x < @sorted; $x++ )
    {
        my $last_offset =
            $x == 1 ? $self->{max_span}{offset} : $changes[ $x - 2 ]->offset;

        my $span =
            DateTime::TimeZone::OlsonDB::Change::two_changes_as_span
                ( @sorted[ $x - 1, $x ], $last_offset );

        $self->{tree}->insert( { utc   => [ $span->{utc_start},   $span->{utc_end} ],
                                 local => [ $span->{local_start}, $span->{local_end} ],
                               },
                               $span );

        $match = $span
            if $seconds >= $span->{utc_start} && $seconds < $span->{utc_end};
    }

    $self->{max_span} = $self->{tree}->max->val;

    return $match;
}


1;

__END__

=head1 NAME

DateTime::TimeZone::Antarctica::McMurdo - Time zone data for Antarctica/McMurdo

=head1 SYNOPSIS

  my $timezone = DateTime::TimeZone->new( name => 'Antarctica/McMurdo' );

=head1 DESCRIPTION

This module is an internal timezone definition data file used by
DateTime::TimeZone.  You do not need to use this module directly.

=cut