tzinfo 0.3.35 → 0.3.36

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of tzinfo might be problematic. Click here for more details.

Files changed (33) hide show
  1. data/CHANGES +10 -0
  2. data/Rakefile +1 -1
  3. data/lib/tzinfo/country_timezone.rb +4 -5
  4. data/lib/tzinfo/definitions/Africa/Cairo.rb +2 -2
  5. data/lib/tzinfo/definitions/Africa/Gaborone.rb +6 -4
  6. data/lib/tzinfo/definitions/Africa/Tripoli.rb +77 -0
  7. data/lib/tzinfo/definitions/America/Barbados.rb +4 -4
  8. data/lib/tzinfo/definitions/America/Bogota.rb +4 -4
  9. data/lib/tzinfo/definitions/America/Costa_Rica.rb +4 -4
  10. data/lib/tzinfo/definitions/America/Curacao.rb +2 -2
  11. data/lib/tzinfo/definitions/America/Nassau.rb +2 -2
  12. data/lib/tzinfo/definitions/America/Santiago.rb +75 -75
  13. data/lib/tzinfo/definitions/Antarctica/Palmer.rb +75 -75
  14. data/lib/tzinfo/definitions/Asia/Aden.rb +2 -2
  15. data/lib/tzinfo/definitions/Asia/Hong_Kong.rb +2 -2
  16. data/lib/tzinfo/definitions/Asia/Khandyga.rb +88 -0
  17. data/lib/tzinfo/definitions/Asia/Muscat.rb +2 -2
  18. data/lib/tzinfo/definitions/Asia/Rangoon.rb +2 -2
  19. data/lib/tzinfo/definitions/Asia/Shanghai.rb +2 -2
  20. data/lib/tzinfo/definitions/Asia/Ust__m__Nera.rb +87 -0
  21. data/lib/tzinfo/definitions/Atlantic/Bermuda.rb +2 -2
  22. data/lib/tzinfo/definitions/Europe/Busingen.rb +11 -0
  23. data/lib/tzinfo/definitions/Europe/Vienna.rb +2 -2
  24. data/lib/tzinfo/definitions/Pacific/Easter.rb +75 -75
  25. data/lib/tzinfo/definitions/Pacific/Fiji.rb +2 -2
  26. data/lib/tzinfo/indexes/countries.rb +4 -1
  27. data/lib/tzinfo/indexes/timezones.rb +3 -0
  28. data/lib/tzinfo/time_or_datetime.rb +2 -2
  29. data/lib/tzinfo/timezone_offset_info.rb +2 -2
  30. data/lib/tzinfo/timezone_period.rb +9 -7
  31. data/lib/tzinfo/timezone_transition_info.rb +3 -4
  32. data/test/tc_timezone.rb +2 -2
  33. metadata +10 -4
@@ -5,11 +5,11 @@ module TZInfo
5
5
  include TimezoneDefinition
6
6
 
7
7
  timezone 'Pacific/Fiji' do |tz|
8
- tz.offset :o0, 42820, 0, :LMT
8
+ tz.offset :o0, 42944, 0, :LMT
9
9
  tz.offset :o1, 43200, 0, :FJT
10
10
  tz.offset :o2, 43200, 3600, :FJST
11
11
 
12
- tz.transition 1915, 10, :o1, 10457838739, 4320
12
+ tz.transition 1915, 10, :o1, 1634037302, 675
13
13
  tz.transition 1998, 10, :o2, 909842400
14
14
  tz.transition 1999, 2, :o1, 920124000
15
15
  tz.transition 1999, 11, :o2, 941896800
@@ -250,7 +250,8 @@ module TZInfo
250
250
  c.timezone 'Europe/Prague', 601, 12, 433, 30
251
251
  end
252
252
  country 'DE', 'Germany' do |c|
253
- c.timezone 'Europe/Berlin', 105, 2, 401, 30
253
+ c.timezone 'Europe/Berlin', 105, 2, 401, 30, 'most locations'
254
+ c.timezone 'Europe/Busingen', 477, 10, 521, 60, 'Busingen'
254
255
  end
255
256
  country 'DJ', 'Djibouti' do |c|
256
257
  c.timezone 'Africa/Djibouti', 58, 5, 863, 20
@@ -699,8 +700,10 @@ module TZInfo
699
700
  c.timezone 'Asia/Krasnoyarsk', 3361, 60, 557, 6, 'Moscow+04 - Yenisei River'
700
701
  c.timezone 'Asia/Irkutsk', 784, 15, 313, 3, 'Moscow+05 - Lake Baikal'
701
702
  c.timezone 'Asia/Yakutsk', 62, 1, 389, 3, 'Moscow+06 - Lena River'
703
+ c.timezone 'Asia/Khandyga', 225563, 3600, 243997, 1800, 'Moscow+06 - Tomponsky, Ust-Maysky'
702
704
  c.timezone 'Asia/Vladivostok', 259, 6, 1979, 15, 'Moscow+07 - Amur River'
703
705
  c.timezone 'Asia/Sakhalin', 1409, 30, 1427, 10, 'Moscow+07 - Sakhalin Island'
706
+ c.timezone 'Asia/Ust-Nera', 232417, 3600, 10742, 75, 'Moscow+07 - Oymyakonsky'
704
707
  c.timezone 'Asia/Magadan', 1787, 30, 754, 5, 'Moscow+08 - Magadan'
705
708
  c.timezone 'Asia/Kamchatka', 3181, 60, 3173, 20, 'Moscow+08 - Kamchatka'
706
709
  c.timezone 'Asia/Anadyr', 259, 4, 10649, 60, 'Moscow+08 - Bering Sea'
@@ -276,6 +276,7 @@ module TZInfo
276
276
  timezone 'Asia/Kashgar'
277
277
  timezone 'Asia/Kathmandu'
278
278
  linked_timezone 'Asia/Katmandu'
279
+ timezone 'Asia/Khandyga'
279
280
  timezone 'Asia/Kolkata'
280
281
  timezone 'Asia/Krasnoyarsk'
281
282
  timezone 'Asia/Kuala_Lumpur'
@@ -320,6 +321,7 @@ module TZInfo
320
321
  timezone 'Asia/Ulaanbaatar'
321
322
  linked_timezone 'Asia/Ulan_Bator'
322
323
  timezone 'Asia/Urumqi'
324
+ timezone 'Asia/Ust-Nera'
323
325
  timezone 'Asia/Vientiane'
324
326
  timezone 'Asia/Vladivostok'
325
327
  timezone 'Asia/Yakutsk'
@@ -428,6 +430,7 @@ module TZInfo
428
430
  timezone 'Europe/Brussels'
429
431
  timezone 'Europe/Bucharest'
430
432
  timezone 'Europe/Budapest'
433
+ linked_timezone 'Europe/Busingen'
431
434
  timezone 'Europe/Chisinau'
432
435
  timezone 'Europe/Copenhagen'
433
436
  timezone 'Europe/Dublin'
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2006-2010 Philip Ross
2
+ # Copyright (c) 2006-2012 Philip Ross
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  # of this software and associated documentation files (the "Software"), to deal
@@ -251,7 +251,7 @@ module TZInfo
251
251
  # constructed with the same type (DateTime, Time or timestamp) as this
252
252
  # TimeOrDateTime.
253
253
  def eql?(todt)
254
- todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig)
254
+ todt.kind_of?(TimeOrDateTime) && to_orig.eql?(todt.to_orig)
255
255
  end
256
256
 
257
257
  # Returns a hash of this TimeOrDateTime.
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2006 Philip Ross
2
+ # Copyright (c) 2006-2012 Philip Ross
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  # of this software and associated documentation files (the "Software"), to deal
@@ -71,7 +71,7 @@ module TZInfo
71
71
  # Returns true if and only if toi has the same utc_offset, std_offset
72
72
  # and abbreviation as this TimezoneOffsetInfo.
73
73
  def ==(toi)
74
- toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) &&
74
+ toi.kind_of?(TimezoneOffsetInfo) &&
75
75
  utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation
76
76
  end
77
77
 
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2005-2010 Philip Ross
2
+ # Copyright (c) 2005-2012 Philip Ross
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  # of this software and associated documentation files (the "Software"), to deal
@@ -165,17 +165,19 @@ module TZInfo
165
165
  # Returns true if this TimezonePeriod is equal to p. This compares the
166
166
  # start_transition, end_transition and offset using ==.
167
167
  def ==(p)
168
- p.respond_to?(:start_transition) && p.respond_to?(:end_transition) &&
169
- p.respond_to?(:offset) && start_transition == p.start_transition &&
170
- end_transition == p.end_transition && offset == p.offset
168
+ p.kind_of?(TimezonePeriod) &&
169
+ start_transition == p.start_transition &&
170
+ end_transition == p.end_transition &&
171
+ offset == p.offset
171
172
  end
172
173
 
173
174
  # Returns true if this TimezonePeriods is equal to p. This compares the
174
175
  # start_transition, end_transition and offset using eql?
175
176
  def eql?(p)
176
- p.respond_to?(:start_transition) && p.respond_to?(:end_transition) &&
177
- p.respond_to?(:offset) && start_transition.eql?(p.start_transition) &&
178
- end_transition.eql?(p.end_transition) && offset.eql?(p.offset)
177
+ p.kind_of?(TimezonePeriod) &&
178
+ start_transition.eql?(p.start_transition) &&
179
+ end_transition.eql?(p.end_transition) &&
180
+ offset.eql?(p.offset)
179
181
  end
180
182
 
181
183
  # Returns a hash of this TimezonePeriod.
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2006-2010 Philip Ross
2
+ # Copyright (c) 2006-2012 Philip Ross
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  # of this software and associated documentation files (the "Software"), to deal
@@ -98,7 +98,7 @@ module TZInfo
98
98
  # considered to be equal by == if offset, previous_offset and at are all
99
99
  # equal.
100
100
  def ==(tti)
101
- tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) &&
101
+ tti.kind_of?(TimezoneTransitionInfo) &&
102
102
  offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at
103
103
  end
104
104
 
@@ -109,8 +109,7 @@ module TZInfo
109
109
  # which just requires the at times to be equal regardless of how they were
110
110
  # originally specified.
111
111
  def eql?(tti)
112
- tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) &&
113
- tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) &&
112
+ tti.kind_of?(TimezoneTransitionInfo) &&
114
113
  offset == tti.offset && previous_offset == tti.previous_offset &&
115
114
  numerator_or_time == tti.numerator_or_time && denominator == tti.denominator
116
115
  end
@@ -148,10 +148,10 @@ class TCTimezone < Test::Unit::TestCase
148
148
  end
149
149
  end
150
150
 
151
- # Disable test in Ruby 1.9. See:
151
+ # Disable test in Ruby 1.9 and Ruby 2.0. See:
152
152
  # http://groups.google.com/group/ruby-talk-google/browse_thread/thread/170a7205555cedfc
153
153
  # It doesn't appear to be possible to require a file from the load path in Ruby 1.9.
154
- if RUBY_VERSION !~ /^1.9/
154
+ if RUBY_VERSION !~ /\A(1\.9|2)\./
155
155
  def test_get_tainted_not_loaded
156
156
  safe_test do
157
157
  tz = Timezone.get('Europe/Amsterdam'.taint)
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzinfo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 91
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 35
10
- version: 0.3.35
9
+ - 36
10
+ segments_generated: true
11
+ version: 0.3.36
11
12
  platform: ruby
12
13
  authors:
13
14
  - Philip Ross
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2012-11-03 17:00:00 -07:00
19
+ date: 2013-03-02 16:00:00 -08:00
19
20
  default_executable:
20
21
  dependencies: []
21
22
 
@@ -160,6 +161,7 @@ files:
160
161
  - lib/tzinfo/definitions/Europe/Lisbon.rb
161
162
  - lib/tzinfo/definitions/Europe/Vienna.rb
162
163
  - lib/tzinfo/definitions/Europe/Tiraspol.rb
164
+ - lib/tzinfo/definitions/Europe/Busingen.rb
163
165
  - lib/tzinfo/definitions/Europe/Simferopol.rb
164
166
  - lib/tzinfo/definitions/Europe/Brussels.rb
165
167
  - lib/tzinfo/definitions/Europe/Podgorica.rb
@@ -568,6 +570,7 @@ files:
568
570
  - lib/tzinfo/definitions/Asia/Vientiane.rb
569
571
  - lib/tzinfo/definitions/Asia/Brunei.rb
570
572
  - lib/tzinfo/definitions/Asia/Yerevan.rb
573
+ - lib/tzinfo/definitions/Asia/Khandyga.rb
571
574
  - lib/tzinfo/definitions/Asia/Oral.rb
572
575
  - lib/tzinfo/definitions/Asia/Jerusalem.rb
573
576
  - lib/tzinfo/definitions/Asia/Kuching.rb
@@ -611,6 +614,7 @@ files:
611
614
  - lib/tzinfo/definitions/Asia/Novokuznetsk.rb
612
615
  - lib/tzinfo/definitions/Asia/Baku.rb
613
616
  - lib/tzinfo/definitions/Asia/Amman.rb
617
+ - lib/tzinfo/definitions/Asia/Ust__m__Nera.rb
614
618
  - lib/tzinfo/definitions/Asia/Gaza.rb
615
619
  - lib/tzinfo/definitions/Asia/Harbin.rb
616
620
  - lib/tzinfo/definitions/Asia/Choibalsan.rb
@@ -684,6 +688,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
684
688
  hash: 3
685
689
  segments:
686
690
  - 0
691
+ segments_generated: true
687
692
  version: "0"
688
693
  required_rubygems_version: !ruby/object:Gem::Requirement
689
694
  none: false
@@ -693,6 +698,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
693
698
  hash: 3
694
699
  segments:
695
700
  - 0
701
+ segments_generated: true
696
702
  version: "0"
697
703
  requirements: []
698
704