lib/tzinfo/definitions/Africa/Asmera.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Africa/Asmera.rb in tzinfo-0.3.0

- old
+ new

@@ -1,15 +1,22 @@ -require 'tzinfo/timezone' +require 'tzinfo/timezone_definition' + module TZInfo -module Definitions #:nodoc: -module Africa #:nodoc: -class Asmera < Timezone #:nodoc: -setup -set_identifier('Africa/Asmera') -add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(51927769267,21600),0,Date::ITALY),9332,0,:LMT)} -add_period(1869,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(51927769267,21600),0,Date::ITALY),DateTime.new0(Rational.new!(52085557267,21600),0,Date::ITALY),9332,0,:AMT)} -add_period(1889,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(52085557267,21600),0,Date::ITALY),DateTime.new0(Rational.new!(5245113727,2160),0,Date::ITALY),9320,0,:ADMT)} -add_period(1936,5) {TimezonePeriod.new(DateTime.new0(Rational.new!(5245113727,2160),0,Date::ITALY),nil,10800,0,:EAT)} -end -end -end + module Definitions + module Africa + module Asmera + include TimezoneDefinition + + timezone 'Africa/Asmera' do |tz| + tz.offset :o0, 9332, 0, :LMT + tz.offset :o1, 9332, 0, :AMT + tz.offset :o2, 9320, 0, :ADMT + tz.offset :o3, 10800, 0, :EAT + + tz.transition 1869, 12, :o1, 51927769267, 21600 + tz.transition 1889, 12, :o2, 52085557267, 21600 + tz.transition 1936, 5, :o3, 5245113727, 2160 + end + end + end + end end