tzinfo 0.3.55 → 0.3.56

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 (43) hide show
  1. data/CHANGES +6 -0
  2. data/lib/tzinfo/definitions/Africa/Casablanca.rb +68 -1
  3. data/lib/tzinfo/definitions/Africa/El_Aaiun.rb +68 -1
  4. data/lib/tzinfo/definitions/Africa/Sao_Tome.rb +1 -0
  5. data/lib/tzinfo/definitions/America/Campo_Grande.rb +0 -62
  6. data/lib/tzinfo/definitions/America/Cuiaba.rb +0 -62
  7. data/lib/tzinfo/definitions/America/Detroit.rb +4 -0
  8. data/lib/tzinfo/definitions/America/Edmonton.rb +0 -4
  9. data/lib/tzinfo/definitions/America/Indiana/Tell_City.rb +6 -9
  10. data/lib/tzinfo/definitions/America/Kentucky/Louisville.rb +2 -2
  11. data/lib/tzinfo/definitions/America/Metlakatla.rb +2 -1
  12. data/lib/tzinfo/definitions/America/Sao_Paulo.rb +0 -62
  13. data/lib/tzinfo/definitions/America/Vancouver.rb +1 -1
  14. data/lib/tzinfo/definitions/Asia/Gaza.rb +36 -32
  15. data/lib/tzinfo/definitions/Asia/Hebron.rb +36 -32
  16. data/lib/tzinfo/definitions/Asia/Hong_Kong.rb +15 -14
  17. data/lib/tzinfo/definitions/Asia/Jerusalem.rb +4 -0
  18. data/lib/tzinfo/definitions/Asia/Qostanay.rb +72 -0
  19. data/lib/tzinfo/definitions/Asia/Qyzylorda.rb +1 -0
  20. data/lib/tzinfo/definitions/Asia/Seoul.rb +18 -10
  21. data/lib/tzinfo/definitions/Asia/Tehran.rb +14 -14
  22. data/lib/tzinfo/definitions/Etc/UCT.rb +1 -4
  23. data/lib/tzinfo/definitions/Europe/Brussels.rb +1 -1
  24. data/lib/tzinfo/definitions/Europe/Istanbul.rb +23 -37
  25. data/lib/tzinfo/definitions/Europe/Kaliningrad.rb +52 -53
  26. data/lib/tzinfo/definitions/Europe/Rome.rb +1 -1
  27. data/lib/tzinfo/definitions/Europe/Vienna.rb +1 -1
  28. data/lib/tzinfo/definitions/Pacific/Chuuk.rb +10 -3
  29. data/lib/tzinfo/definitions/Pacific/Fiji.rb +36 -36
  30. data/lib/tzinfo/definitions/Pacific/Guam.rb +22 -2
  31. data/lib/tzinfo/definitions/Pacific/Kosrae.rb +15 -6
  32. data/lib/tzinfo/definitions/Pacific/Kwajalein.rb +9 -4
  33. data/lib/tzinfo/definitions/Pacific/Majuro.rb +9 -2
  34. data/lib/tzinfo/definitions/Pacific/Nauru.rb +3 -3
  35. data/lib/tzinfo/definitions/Pacific/Norfolk.rb +64 -1
  36. data/lib/tzinfo/definitions/Pacific/Palau.rb +5 -3
  37. data/lib/tzinfo/definitions/Pacific/Pohnpei.rb +12 -3
  38. data/lib/tzinfo/definitions/UCT.rb +1 -1
  39. data/lib/tzinfo/indexes/countries.rb +5 -4
  40. data/lib/tzinfo/indexes/timezones.rb +2 -1
  41. data/lib/tzinfo/tzdataparser.rb +10 -14
  42. data/tzinfo.gemspec +1 -1
  43. metadata +7 -6
@@ -9,12 +9,17 @@ module TZInfo
9
9
  timezone 'Pacific/Kwajalein' do |tz|
10
10
  tz.offset :o0, 40160, 0, :LMT
11
11
  tz.offset :o1, 39600, 0, :'+11'
12
- tz.offset :o2, -43200, 0, :'-12'
13
- tz.offset :o3, 43200, 0, :'+12'
12
+ tz.offset :o2, 36000, 0, :'+10'
13
+ tz.offset :o3, 32400, 0, :'+09'
14
+ tz.offset :o4, -43200, 0, :'-12'
15
+ tz.offset :o5, 43200, 0, :'+12'
14
16
 
15
17
  tz.transition 1900, 12, :o1, 1304307919, 540
16
- tz.transition 1969, 9, :o2, 58571881, 24
17
- tz.transition 1993, 8, :o3, 745848000
18
+ tz.transition 1936, 12, :o2, 58284817, 24
19
+ tz.transition 1941, 3, :o3, 29161021, 12
20
+ tz.transition 1944, 2, :o1, 19449009, 8
21
+ tz.transition 1969, 9, :o4, 58571881, 24
22
+ tz.transition 1993, 8, :o5, 745934400
18
23
  end
19
24
  end
20
25
  end
@@ -9,10 +9,17 @@ module TZInfo
9
9
  timezone 'Pacific/Majuro' do |tz|
10
10
  tz.offset :o0, 41088, 0, :LMT
11
11
  tz.offset :o1, 39600, 0, :'+11'
12
- tz.offset :o2, 43200, 0, :'+12'
12
+ tz.offset :o2, 32400, 0, :'+09'
13
+ tz.offset :o3, 36000, 0, :'+10'
14
+ tz.offset :o4, 43200, 0, :'+12'
13
15
 
14
16
  tz.transition 1900, 12, :o1, 1086923261, 450
15
- tz.transition 1969, 9, :o2, 58571881, 24
17
+ tz.transition 1914, 9, :o2, 58089745, 24
18
+ tz.transition 1919, 1, :o1, 19375921, 8
19
+ tz.transition 1936, 12, :o3, 58284817, 24
20
+ tz.transition 1941, 3, :o2, 29161021, 12
21
+ tz.transition 1944, 1, :o1, 19448953, 8
22
+ tz.transition 1969, 9, :o4, 58571881, 24
16
23
  end
17
24
  end
18
25
  end
@@ -13,9 +13,9 @@ module TZInfo
13
13
  tz.offset :o3, 43200, 0, :'+12'
14
14
 
15
15
  tz.transition 1921, 1, :o1, 10466081437, 4320
16
- tz.transition 1942, 3, :o2, 116660785, 48
17
- tz.transition 1944, 8, :o1, 19450537, 8
18
- tz.transition 1979, 4, :o3, 294323400
16
+ tz.transition 1942, 8, :o2, 116668801, 48
17
+ tz.transition 1945, 9, :o1, 19453649, 8
18
+ tz.transition 1979, 2, :o3, 287418600
19
19
  end
20
20
  end
21
21
  end
@@ -12,12 +12,75 @@ module TZInfo
12
12
  tz.offset :o2, 41400, 0, :'+1130'
13
13
  tz.offset :o3, 41400, 3600, :'+1230'
14
14
  tz.offset :o4, 39600, 0, :'+11'
15
+ tz.offset :o5, 39600, 3600, :'+12'
15
16
 
16
17
  tz.transition 1900, 12, :o1, 26086158361, 10800
17
18
  tz.transition 1950, 12, :o2, 73009411, 30
18
19
  tz.transition 1974, 10, :o3, 152029800
19
- tz.transition 1975, 3, :o2, 162912600
20
+ tz.transition 1975, 3, :o2, 162916200
20
21
  tz.transition 2015, 10, :o4, 1443882600
22
+ tz.transition 2019, 10, :o5, 1570287600
23
+ tz.transition 2020, 4, :o4, 1586012400
24
+ tz.transition 2020, 10, :o5, 1601737200
25
+ tz.transition 2021, 4, :o4, 1617462000
26
+ tz.transition 2021, 10, :o5, 1633186800
27
+ tz.transition 2022, 4, :o4, 1648911600
28
+ tz.transition 2022, 10, :o5, 1664636400
29
+ tz.transition 2023, 4, :o4, 1680361200
30
+ tz.transition 2023, 9, :o5, 1696086000
31
+ tz.transition 2024, 4, :o4, 1712415600
32
+ tz.transition 2024, 10, :o5, 1728140400
33
+ tz.transition 2025, 4, :o4, 1743865200
34
+ tz.transition 2025, 10, :o5, 1759590000
35
+ tz.transition 2026, 4, :o4, 1775314800
36
+ tz.transition 2026, 10, :o5, 1791039600
37
+ tz.transition 2027, 4, :o4, 1806764400
38
+ tz.transition 2027, 10, :o5, 1822489200
39
+ tz.transition 2028, 4, :o4, 1838214000
40
+ tz.transition 2028, 9, :o5, 1853938800
41
+ tz.transition 2029, 3, :o4, 1869663600
42
+ tz.transition 2029, 10, :o5, 1885993200
43
+ tz.transition 2030, 4, :o4, 1901718000
44
+ tz.transition 2030, 10, :o5, 1917442800
45
+ tz.transition 2031, 4, :o4, 1933167600
46
+ tz.transition 2031, 10, :o5, 1948892400
47
+ tz.transition 2032, 4, :o4, 1964617200
48
+ tz.transition 2032, 10, :o5, 1980342000
49
+ tz.transition 2033, 4, :o4, 1996066800
50
+ tz.transition 2033, 10, :o5, 2011791600
51
+ tz.transition 2034, 4, :o4, 2027516400
52
+ tz.transition 2034, 9, :o5, 2043241200
53
+ tz.transition 2035, 3, :o4, 2058966000
54
+ tz.transition 2035, 10, :o5, 2075295600
55
+ tz.transition 2036, 4, :o4, 2091020400
56
+ tz.transition 2036, 10, :o5, 2106745200
57
+ tz.transition 2037, 4, :o4, 2122470000
58
+ tz.transition 2037, 10, :o5, 2138194800
59
+ tz.transition 2038, 4, :o4, 19724137, 8
60
+ tz.transition 2038, 10, :o5, 19725593, 8
61
+ tz.transition 2039, 4, :o4, 19727049, 8
62
+ tz.transition 2039, 10, :o5, 19728505, 8
63
+ tz.transition 2040, 3, :o4, 19729961, 8
64
+ tz.transition 2040, 10, :o5, 19731473, 8
65
+ tz.transition 2041, 4, :o4, 19732929, 8
66
+ tz.transition 2041, 10, :o5, 19734385, 8
67
+ tz.transition 2042, 4, :o4, 19735841, 8
68
+ tz.transition 2042, 10, :o5, 19737297, 8
69
+ tz.transition 2043, 4, :o4, 19738753, 8
70
+ tz.transition 2043, 10, :o5, 19740209, 8
71
+ tz.transition 2044, 4, :o4, 19741665, 8
72
+ tz.transition 2044, 10, :o5, 19743121, 8
73
+ tz.transition 2045, 4, :o4, 19744577, 8
74
+ tz.transition 2045, 9, :o5, 19746033, 8
75
+ tz.transition 2046, 3, :o4, 19747489, 8
76
+ tz.transition 2046, 10, :o5, 19749001, 8
77
+ tz.transition 2047, 4, :o4, 19750457, 8
78
+ tz.transition 2047, 10, :o5, 19751913, 8
79
+ tz.transition 2048, 4, :o4, 19753369, 8
80
+ tz.transition 2048, 10, :o5, 19754825, 8
81
+ tz.transition 2049, 4, :o4, 19756281, 8
82
+ tz.transition 2049, 10, :o5, 19757737, 8
83
+ tz.transition 2050, 4, :o4, 19759193, 8
21
84
  end
22
85
  end
23
86
  end
@@ -7,10 +7,12 @@ module TZInfo
7
7
  include TimezoneDefinition
8
8
 
9
9
  timezone 'Pacific/Palau' do |tz|
10
- tz.offset :o0, 32276, 0, :LMT
11
- tz.offset :o1, 32400, 0, :'+09'
10
+ tz.offset :o0, -54124, 0, :LMT
11
+ tz.offset :o1, 32276, 0, :LMT
12
+ tz.offset :o2, 32400, 0, :'+09'
12
13
 
13
- tz.transition 1900, 12, :o1, 52172318731, 21600
14
+ tz.transition 1844, 12, :o1, 51730533931, 21600
15
+ tz.transition 1900, 12, :o2, 52172318731, 21600
14
16
  end
15
17
  end
16
18
  end
@@ -7,10 +7,19 @@ module TZInfo
7
7
  include TimezoneDefinition
8
8
 
9
9
  timezone 'Pacific/Pohnpei' do |tz|
10
- tz.offset :o0, 37972, 0, :LMT
11
- tz.offset :o1, 39600, 0, :'+11'
10
+ tz.offset :o0, -48428, 0, :LMT
11
+ tz.offset :o1, 37972, 0, :LMT
12
+ tz.offset :o2, 39600, 0, :'+11'
13
+ tz.offset :o3, 32400, 0, :'+09'
14
+ tz.offset :o4, 36000, 0, :'+10'
12
15
 
13
- tz.transition 1900, 12, :o1, 52172317307, 21600
16
+ tz.transition 1844, 12, :o1, 51730532507, 21600
17
+ tz.transition 1900, 12, :o2, 52172317307, 21600
18
+ tz.transition 1914, 9, :o3, 58089745, 24
19
+ tz.transition 1919, 1, :o2, 19375921, 8
20
+ tz.transition 1936, 12, :o4, 58284817, 24
21
+ tz.transition 1941, 3, :o3, 29161021, 12
22
+ tz.transition 1945, 7, :o2, 19453345, 8
14
23
  end
15
24
  end
16
25
  end
@@ -5,7 +5,7 @@ module TZInfo
5
5
  module UCT
6
6
  include TimezoneDefinition
7
7
 
8
- linked_timezone 'UCT', 'Etc/UCT'
8
+ linked_timezone 'UCT', 'Etc/UTC'
9
9
  end
10
10
  end
11
11
  end
@@ -469,6 +469,7 @@ module TZInfo
469
469
  country 'KZ', 'Kazakhstan' do |c|
470
470
  c.timezone 'Asia/Almaty', 173, 4, 1539, 20, 'Kazakhstan (most areas)'
471
471
  c.timezone 'Asia/Qyzylorda', 224, 5, 982, 15, 'Qyzylorda/Kyzylorda/Kzyl-Orda'
472
+ c.timezone 'Asia/Qostanay', 266, 5, 3817, 60, 'Qostanay/Kostanay/Kustanay'
472
473
  c.timezone 'Asia/Aqtobe', 3017, 60, 343, 6, 'Aqtobe/Aktobe'
473
474
  c.timezone 'Asia/Aqtau', 2671, 60, 754, 15, 'Mangghystau/Mankistau'
474
475
  c.timezone 'Asia/Atyrau', 2827, 60, 779, 15, 'Atyrau/Atirau/Gur\'yev'
@@ -529,7 +530,7 @@ module TZInfo
529
530
  c.timezone 'Pacific/Majuro', 143, 20, 856, 5, 'Marshall Islands (most areas)'
530
531
  c.timezone 'Pacific/Kwajalein', 109, 12, 502, 3, 'Kwajalein'
531
532
  end
532
- country 'MK', 'Macedonia' do |c|
533
+ country 'MK', 'North Macedonia' do |c|
533
534
  c.timezone 'Europe/Skopje', 2519, 60, 643, 30
534
535
  end
535
536
  country 'ML', 'Mali' do |c|
@@ -693,10 +694,9 @@ module TZInfo
693
694
  country 'RU', 'Russia' do |c|
694
695
  c.timezone 'Europe/Kaliningrad', 3283, 60, 41, 2, 'MSK-01 - Kaliningrad'
695
696
  c.timezone 'Europe/Moscow', 66907, 1200, 8464, 225, 'MSK+00 - Moscow area'
696
- c.timezone 'Europe/Simferopol', 899, 20, 341, 10, 'MSK+00 - Crimea'
697
- c.timezone 'Europe/Volgograd', 731, 15, 533, 12, 'MSK+00 - Volgograd'
698
697
  c.timezone 'Europe/Kirov', 293, 5, 993, 20, 'MSK+00 - Kirov'
699
698
  c.timezone 'Europe/Astrakhan', 927, 20, 961, 20, 'MSK+01 - Astrakhan'
699
+ c.timezone 'Europe/Volgograd', 731, 15, 533, 12, 'MSK+01 - Volgograd'
700
700
  c.timezone 'Europe/Saratov', 1547, 30, 1381, 30, 'MSK+01 - Saratov'
701
701
  c.timezone 'Europe/Ulyanovsk', 163, 3, 242, 5, 'MSK+01 - Ulyanovsk'
702
702
  c.timezone 'Europe/Samara', 266, 5, 1003, 20, 'MSK+01 - Samara, Udmurtia'
@@ -782,7 +782,7 @@ module TZInfo
782
782
  country 'SY', 'Syria' do |c|
783
783
  c.timezone 'Asia/Damascus', 67, 2, 363, 10
784
784
  end
785
- country 'SZ', 'Swaziland' do |c|
785
+ country 'SZ', 'Eswatini (Swaziland)' do |c|
786
786
  c.timezone 'Africa/Mbabane', -263, 10, 311, 10
787
787
  end
788
788
  country 'TC', 'Turks & Caicos Is' do |c|
@@ -834,6 +834,7 @@ module TZInfo
834
834
  c.timezone 'Africa/Dar_es_Salaam', -34, 5, 2357, 60
835
835
  end
836
836
  country 'UA', 'Ukraine' do |c|
837
+ c.timezone 'Europe/Simferopol', 899, 20, 341, 10, 'MSK+00 - Crimea'
837
838
  c.timezone 'Europe/Kiev', 1513, 30, 1831, 60, 'Ukraine (most areas)'
838
839
  c.timezone 'Europe/Uzhgorod', 2917, 60, 223, 10, 'Ruthenia'
839
840
  c.timezone 'Europe/Zaporozhye', 287, 6, 211, 6, 'Zaporozh\'ye/Zaporizhia; Lugansk/Luhansk (east)'
@@ -306,6 +306,7 @@ module TZInfo
306
306
  timezone 'Asia/Pontianak'
307
307
  timezone 'Asia/Pyongyang'
308
308
  timezone 'Asia/Qatar'
309
+ timezone 'Asia/Qostanay'
309
310
  timezone 'Asia/Qyzylorda'
310
311
  linked_timezone 'Asia/Rangoon'
311
312
  timezone 'Asia/Riyadh'
@@ -424,7 +425,7 @@ module TZInfo
424
425
  timezone 'Etc/GMT-9'
425
426
  linked_timezone 'Etc/GMT0'
426
427
  linked_timezone 'Etc/Greenwich'
427
- timezone 'Etc/UCT'
428
+ linked_timezone 'Etc/UCT'
428
429
  timezone 'Etc/UTC'
429
430
  linked_timezone 'Etc/Universal'
430
431
  linked_timezone 'Etc/Zulu'
@@ -483,8 +483,9 @@ module TZInfo
483
483
  end
484
484
 
485
485
  def at_utc_time(year, utc_offset, std_offset)
486
+ absolute = @on_day.to_absolute(year, @in_month)
486
487
  @at_time.to_utc(utc_offset, std_offset,
487
- year, @in_month, @on_day.to_absolute(year, @in_month))
488
+ absolute.year, absolute.month, absolute.day)
488
489
  end
489
490
 
490
491
  private
@@ -1036,7 +1037,8 @@ module TZInfo
1036
1037
  end
1037
1038
 
1038
1039
  # A tz data day of the month reference. Can either be an absolute day,
1039
- # a last week day or a week day >= or <= than a specific day of month.
1040
+ # a last week day or a week day >= or <= than a specific day of month. Can
1041
+ # result in a day in the neighbouring month.
1040
1042
  #
1041
1043
  # @private
1042
1044
  class TZDataDayOfMonth #:nodoc:
@@ -1062,30 +1064,23 @@ module TZInfo
1062
1064
  end
1063
1065
  end
1064
1066
 
1065
- # Returns the absolute day of month for the given year and month.
1067
+ # Returns the absolute date for the given year and month.
1066
1068
  def to_absolute(year, month)
1067
1069
  case @type
1068
1070
  when :last
1069
1071
  last_day_in_month = (Date.new(year, month, 1) >> 1) - 1
1070
1072
  offset = last_day_in_month.wday - @day_of_week
1071
1073
  offset = offset + 7 if offset < 0
1072
- (last_day_in_month - offset).day
1074
+ last_day_in_month - offset
1073
1075
  when :comparison
1074
1076
  pivot = Date.new(year, month, @day_of_month)
1075
1077
  offset = @day_of_week - pivot.wday
1076
1078
  offset = -offset if @operator == :less_equal
1077
1079
  offset = offset + 7 if offset < 0
1078
1080
  offset = -offset if @operator == :less_equal
1079
- result = pivot + offset
1080
- if result.month != pivot.month
1081
- puts self.inspect
1082
- puts year
1083
- puts month
1084
- end
1085
- raise 'No suitable date found' if result.month != pivot.month
1086
- result.day
1081
+ pivot + offset
1087
1082
  else #absolute
1088
- @day_of_month
1083
+ Date.new(year, month, @day_of_month)
1089
1084
  end
1090
1085
  end
1091
1086
 
@@ -1143,7 +1138,8 @@ module TZInfo
1143
1138
 
1144
1139
  # Converts the reference to a UTC DateTime.
1145
1140
  def to_utc(utc_offset, std_offset)
1146
- @time.to_utc(utc_offset, std_offset, @year, @month, @day.to_absolute(@year, @month))
1141
+ absolute = @day.to_absolute(@year, @month)
1142
+ @time.to_utc(utc_offset, std_offset, absolute.year, absolute.month, absolute.day)
1147
1143
  end
1148
1144
  end
1149
1145
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'tzinfo'
3
- s.version = '0.3.55'
3
+ s.version = '0.3.56'
4
4
  s.author = 'Philip Ross'
5
5
  s.email = 'phil.ross@gmail.com'
6
6
  s.homepage = 'http://tzinfo.github.io'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzinfo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 125
5
- prerelease: false
4
+ hash: 99
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 55
10
- version: 0.3.55
9
+ - 56
10
+ version: 0.3.56
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip Ross
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2018-10-26 16:00:00 -07:00
18
+ date: 2019-10-31 17:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -149,6 +149,7 @@ files:
149
149
  - lib/tzinfo/definitions/Asia/Omsk.rb
150
150
  - lib/tzinfo/definitions/Asia/Jakarta.rb
151
151
  - lib/tzinfo/definitions/Asia/Anadyr.rb
152
+ - lib/tzinfo/definitions/Asia/Qostanay.rb
152
153
  - lib/tzinfo/definitions/Asia/Harbin.rb
153
154
  - lib/tzinfo/definitions/Asia/Tokyo.rb
154
155
  - lib/tzinfo/definitions/Asia/Famagusta.rb
@@ -711,7 +712,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
711
712
  requirements: []
712
713
 
713
714
  rubyforge_project: tzinfo
714
- rubygems_version: 1.3.7
715
+ rubygems_version: 1.6.2
715
716
  signing_key:
716
717
  specification_version: 3
717
718
  summary: Daylight-savings aware timezone library