lib/tzinfo/definitions/Asia/Manila.rb in tzinfo-0.2.2 vs lib/tzinfo/definitions/Asia/Manila.rb in tzinfo-0.3.0

- old
+ new

@@ -1,22 +1,30 @@ -require 'tzinfo/timezone' +require 'tzinfo/timezone_definition' + module TZInfo -module Definitions #:nodoc: -module Asia #:nodoc: -class Manila < Timezone #:nodoc: -setup -set_identifier('Asia/Manila') -add_unbounded_start_period {TimezonePeriod.new(nil,DateTime.new0(Rational.new!(862175579,360),0,Date::ITALY),-57360,0,:LMT)} -add_period(1844,12) {TimezonePeriod.new(DateTime.new0(Rational.new!(862175579,360),0,Date::ITALY),DateTime.new0(Rational.new!(869322659,360),0,Date::ITALY),29040,0,:LMT)} -add_period(1899,5) {TimezonePeriod.new(DateTime.new0(Rational.new!(869322659,360),0,Date::ITALY),DateTime.new0(Rational.new!(14570839,6),0,Date::ITALY),28800,0,:PHT)} -add_period(1936,10) {TimezonePeriod.new(DateTime.new0(Rational.new!(14570839,6),0,Date::ITALY),DateTime.new0(Rational.new!(19428521,8),0,Date::ITALY),28800,3600,:PHST)} -add_period(1937,1) {TimezonePeriod.new(DateTime.new0(Rational.new!(19428521,8),0,Date::ITALY),DateTime.new0(Rational.new!(14582881,6),0,Date::ITALY),28800,0,:PHT)} -add_period(1942,4) {TimezonePeriod.new(DateTime.new0(Rational.new!(14582881,6),0,Date::ITALY),DateTime.new0(Rational.new!(19451161,8),0,Date::ITALY),32400,0,:JST)} -add_period(1944,10) {TimezonePeriod.new(DateTime.new0(Rational.new!(19451161,8),0,Date::ITALY),DateTime.new0(Rational.new!(14609065,6),0,Date::ITALY),28800,0,:PHT)} -add_period(1954,4) {TimezonePeriod.new(DateTime.new0(Rational.new!(14609065,6),0,Date::ITALY),DateTime.new0(Rational.new!(19479393,8),0,Date::ITALY),28800,3600,:PHST)} -add_period(1954,6) {TimezonePeriod.new(DateTime.new0(Rational.new!(19479393,8),0,Date::ITALY),259344000,28800,0,:PHT)} -add_period(1978,3) {TimezonePeriod.new(259344000,275151600,28800,3600,:PHST)} -add_period(1978,9) {TimezonePeriod.new(275151600,nil,28800,0,:PHT)} -end -end -end + module Definitions + module Asia + module Manila + include TimezoneDefinition + + timezone 'Asia/Manila' do |tz| + tz.offset :o0, -57360, 0, :LMT + tz.offset :o1, 29040, 0, :LMT + tz.offset :o2, 28800, 0, :PHT + tz.offset :o3, 28800, 3600, :PHST + tz.offset :o4, 32400, 0, :JST + + tz.transition 1844, 12, :o1, 862175579, 360 + tz.transition 1899, 5, :o2, 869322659, 360 + tz.transition 1936, 10, :o3, 14570839, 6 + tz.transition 1937, 1, :o2, 19428521, 8 + tz.transition 1942, 4, :o4, 14582881, 6 + tz.transition 1944, 10, :o2, 19451161, 8 + tz.transition 1954, 4, :o3, 14609065, 6 + tz.transition 1954, 6, :o2, 19479393, 8 + tz.transition 1978, 3, :o3, 259344000 + tz.transition 1978, 9, :o2, 275151600 + end + end + end + end end