lib/tzinfo/definitions/Africa/Conakry.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Africa/Conakry.rb in tzinfo-0.3.0
- old
+ new
@@ -1,15 +1,21 @@
-require 'tzinfo/timezone'
+require 'tzinfo/timezone_definition'
+
module TZInfo
-module Definitions #:nodoc:
-module Africa #:nodoc:
-class Conakry < Timezone #:nodoc:
-setup
-set_identifier('Africa/Conakry')
-add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(52259094823,21600),0,Date::ITALY),-3292,0,:LMT)}
-add_period(1912,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(52259094823,21600),0,Date::ITALY),DateTime.new0(Rational.new!(4854989,2),0,Date::ITALY),0,0,:GMT)}
-add_period(1934,2) {TimezonePeriod.new(DateTime.new0(Rational.new!(4854989,2),0,Date::ITALY),DateTime.new0(Rational.new!(58486429,24),0,Date::ITALY),-3600,0,:WAT)}
-add_period(1960,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(58486429,24),0,Date::ITALY),nil,0,0,:GMT)}
-end
-end
-end
+ module Definitions
+ module Africa
+ module Conakry
+ include TimezoneDefinition
+
+ timezone 'Africa/Conakry' do |tz|
+ tz.offset :o0, -3292, 0, :LMT
+ tz.offset :o1, 0, 0, :GMT
+ tz.offset :o2, -3600, 0, :WAT
+
+ tz.transition 1912, 1, :o1, 52259094823, 21600
+ tz.transition 1934, 2, :o2, 4854989, 2
+ tz.transition 1960, 1, :o1, 58486429, 24
+ end
+ end
+ end
+ end
end