lib/tzinfo/definitions/America/Antigua.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/America/Antigua.rb in tzinfo-0.3.0

- old
+ new

@@ -1,14 +1,20 @@ -require 'tzinfo/timezone' +require 'tzinfo/timezone_definition' + module TZInfo -module Definitions #:nodoc: -module America #:nodoc: -class Antigua < Timezone #:nodoc: -setup -set_identifier('America/Antigua') -add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(1451678203,600),0,Date::ITALY),-14832,0,:LMT)} -add_period(1912,3) {TimezonePeriod.new(DateTime.new0(Rational.new!(1451678203,600),0,Date::ITALY),DateTime.new0(Rational.new!(58407545,24),0,Date::ITALY),-18000,0,:EST)} -add_period(1951,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(58407545,24),0,Date::ITALY),nil,-14400,0,:AST)} -end -end -end + module Definitions + module America + module Antigua + include TimezoneDefinition + + timezone 'America/Antigua' do |tz| + tz.offset :o0, -14832, 0, :LMT + tz.offset :o1, -18000, 0, :EST + tz.offset :o2, -14400, 0, :AST + + tz.transition 1912, 3, :o1, 1451678203, 600 + tz.transition 1951, 1, :o2, 58407545, 24 + end + end + end + end end