lib/tzinfo/definitions/Africa/Sao_Tome.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Africa/Sao_Tome.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 Africa #:nodoc: -class Sao_Tome < Timezone #:nodoc: -setup -set_identifier('Africa/Sao_Tome') -add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(13009552999,5400),0,Date::ITALY),1616,0,:LMT)} -add_period(1883,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(13009552999,5400),0,Date::ITALY),DateTime.new0(Rational.new!(13064773637,5400),0,Date::ITALY),-2192,0,:LMT)} -add_period(1912,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(13064773637,5400),0,Date::ITALY),nil,0,0,:GMT)} -end -end -end + module Definitions + module Africa + module Sao_Tome + include TimezoneDefinition + + timezone 'Africa/Sao_Tome' do |tz| + tz.offset :o0, 1616, 0, :LMT + tz.offset :o1, -2192, 0, :LMT + tz.offset :o2, 0, 0, :GMT + + tz.transition 1883, 12, :o1, 13009552999, 5400 + tz.transition 1912, 1, :o2, 13064773637, 5400 + end + end + end + end end