tzinfo 0.3.55 → 0.3.60
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.
- data/CHANGES +30 -0
- data/LICENSE +1 -1
- data/lib/tzinfo/definitions/Africa/Accra.rb +63 -47
- data/lib/tzinfo/definitions/Africa/Algiers.rb +1 -1
- data/lib/tzinfo/definitions/Africa/Casablanca.rb +68 -1
- data/lib/tzinfo/definitions/Africa/El_Aaiun.rb +68 -1
- data/lib/tzinfo/definitions/Africa/Juba.rb +1 -0
- data/lib/tzinfo/definitions/Africa/Lagos.rb +8 -3
- data/lib/tzinfo/definitions/Africa/Nairobi.rb +7 -6
- data/lib/tzinfo/definitions/Africa/Sao_Tome.rb +1 -0
- data/lib/tzinfo/definitions/America/Belize.rb +50 -5
- data/lib/tzinfo/definitions/America/Campo_Grande.rb +0 -62
- data/lib/tzinfo/definitions/America/Cuiaba.rb +0 -62
- data/lib/tzinfo/definitions/America/Dawson.rb +2 -61
- data/lib/tzinfo/definitions/America/Detroit.rb +4 -0
- data/lib/tzinfo/definitions/America/Edmonton.rb +0 -4
- data/lib/tzinfo/definitions/America/Godthab.rb +1 -149
- data/lib/tzinfo/definitions/America/Grand_Turk.rb +1 -2
- data/lib/tzinfo/definitions/America/Indiana/Tell_City.rb +6 -9
- data/lib/tzinfo/definitions/America/Kentucky/Louisville.rb +2 -2
- data/lib/tzinfo/definitions/America/Metlakatla.rb +2 -1
- data/lib/tzinfo/definitions/America/Nassau.rb +95 -88
- data/lib/tzinfo/definitions/America/Nuuk.rb +161 -0
- data/lib/tzinfo/definitions/America/Sao_Paulo.rb +0 -62
- data/lib/tzinfo/definitions/America/Vancouver.rb +1 -1
- data/lib/tzinfo/definitions/America/Whitehorse.rb +2 -61
- data/lib/tzinfo/definitions/Antarctica/Casey.rb +5 -0
- data/lib/tzinfo/definitions/Antarctica/Macquarie.rb +80 -3
- data/lib/tzinfo/definitions/Asia/Gaza.rb +54 -48
- data/lib/tzinfo/definitions/Asia/Hebron.rb +54 -48
- data/lib/tzinfo/definitions/Asia/Hong_Kong.rb +15 -14
- data/lib/tzinfo/definitions/Asia/Jerusalem.rb +29 -23
- data/lib/tzinfo/definitions/Asia/Qostanay.rb +72 -0
- data/lib/tzinfo/definitions/Asia/Qyzylorda.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Seoul.rb +18 -10
- data/lib/tzinfo/definitions/Asia/Shanghai.rb +2 -0
- data/lib/tzinfo/definitions/Asia/Tehran.rb +14 -14
- data/lib/tzinfo/definitions/Atlantic/Bermuda.rb +186 -157
- data/lib/tzinfo/definitions/Australia/Adelaide.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Brisbane.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Broken_Hill.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Currie.rb +1 -173
- data/lib/tzinfo/definitions/Australia/Darwin.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Eucla.rb +4 -4
- data/lib/tzinfo/definitions/Australia/Hobart.rb +8 -4
- data/lib/tzinfo/definitions/Australia/Lindeman.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Melbourne.rb +5 -5
- data/lib/tzinfo/definitions/Australia/Perth.rb +4 -4
- data/lib/tzinfo/definitions/Australia/Sydney.rb +5 -5
- data/lib/tzinfo/definitions/Etc/UCT.rb +1 -4
- data/lib/tzinfo/definitions/Europe/Brussels.rb +1 -1
- data/lib/tzinfo/definitions/Europe/Budapest.rb +22 -22
- data/lib/tzinfo/definitions/Europe/Istanbul.rb +23 -37
- data/lib/tzinfo/definitions/Europe/Kaliningrad.rb +52 -53
- data/lib/tzinfo/definitions/Europe/Monaco.rb +2 -2
- data/lib/tzinfo/definitions/Europe/Paris.rb +2 -2
- data/lib/tzinfo/definitions/Europe/Rome.rb +1 -1
- data/lib/tzinfo/definitions/Europe/Vienna.rb +1 -1
- data/lib/tzinfo/definitions/Europe/Volgograd.rb +1 -0
- data/lib/tzinfo/definitions/Indian/Mahe.rb +1 -1
- data/lib/tzinfo/definitions/Pacific/Chuuk.rb +10 -3
- data/lib/tzinfo/definitions/Pacific/Efate.rb +3 -1
- data/lib/tzinfo/definitions/Pacific/Fiji.rb +36 -36
- data/lib/tzinfo/definitions/Pacific/Guam.rb +22 -2
- data/lib/tzinfo/definitions/Pacific/Kosrae.rb +15 -6
- data/lib/tzinfo/definitions/Pacific/Kwajalein.rb +9 -4
- data/lib/tzinfo/definitions/Pacific/Majuro.rb +9 -2
- data/lib/tzinfo/definitions/Pacific/Nauru.rb +3 -3
- data/lib/tzinfo/definitions/Pacific/Norfolk.rb +64 -1
- data/lib/tzinfo/definitions/Pacific/Palau.rb +5 -3
- data/lib/tzinfo/definitions/Pacific/Pohnpei.rb +12 -3
- data/lib/tzinfo/definitions/UCT.rb +1 -1
- data/lib/tzinfo/indexes/countries.rb +11 -11
- data/lib/tzinfo/indexes/timezones.rb +5 -4
- data/lib/tzinfo/tzdataparser.rb +10 -14
- data/test/tc_timezone_melbourne.rb +21 -21
- data/tzinfo.gemspec +1 -1
- metadata +8 -7
- data/lib/tzinfo/definitions/US/Pacific__m__New.rb +0 -13
@@ -7,13 +7,22 @@ module TZInfo
|
|
7
7
|
include TimezoneDefinition
|
8
8
|
|
9
9
|
timezone 'Pacific/Kosrae' do |tz|
|
10
|
-
tz.offset :o0,
|
11
|
-
tz.offset :o1,
|
12
|
-
tz.offset :o2,
|
10
|
+
tz.offset :o0, -47284, 0, :LMT
|
11
|
+
tz.offset :o1, 39116, 0, :LMT
|
12
|
+
tz.offset :o2, 39600, 0, :'+11'
|
13
|
+
tz.offset :o3, 32400, 0, :'+09'
|
14
|
+
tz.offset :o4, 36000, 0, :'+10'
|
15
|
+
tz.offset :o5, 43200, 0, :'+12'
|
13
16
|
|
14
|
-
tz.transition
|
15
|
-
tz.transition
|
16
|
-
tz.transition
|
17
|
+
tz.transition 1844, 12, :o1, 51730532221, 21600
|
18
|
+
tz.transition 1900, 12, :o2, 52172317021, 21600
|
19
|
+
tz.transition 1914, 9, :o3, 58089745, 24
|
20
|
+
tz.transition 1919, 1, :o2, 19375921, 8
|
21
|
+
tz.transition 1936, 12, :o4, 58284817, 24
|
22
|
+
tz.transition 1941, 3, :o3, 29161021, 12
|
23
|
+
tz.transition 1945, 7, :o2, 19453345, 8
|
24
|
+
tz.transition 1969, 9, :o5, 58571881, 24
|
25
|
+
tz.transition 1998, 12, :o2, 915105600
|
17
26
|
end
|
18
27
|
end
|
19
28
|
end
|
@@ -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,
|
13
|
-
tz.offset :o3,
|
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
|
17
|
-
tz.transition
|
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,
|
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
|
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,
|
17
|
-
tz.transition
|
18
|
-
tz.transition 1979,
|
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,
|
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,
|
11
|
-
tz.offset :o1,
|
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
|
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,
|
11
|
-
tz.offset :o1,
|
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
|
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
|
@@ -64,8 +64,7 @@ module TZInfo
|
|
64
64
|
country 'AU', 'Australia' do |c|
|
65
65
|
c.timezone 'Australia/Lord_Howe', -631, 20, 1909, 12, 'Lord Howe Island'
|
66
66
|
c.timezone 'Antarctica/Macquarie', -109, 2, 3179, 20, 'Macquarie Island'
|
67
|
-
c.timezone 'Australia/Hobart', -2573, 60, 8839, 60, 'Tasmania
|
68
|
-
c.timezone 'Australia/Currie', -599, 15, 2158, 15, 'Tasmania (King Island)'
|
67
|
+
c.timezone 'Australia/Hobart', -2573, 60, 8839, 60, 'Tasmania'
|
69
68
|
c.timezone 'Australia/Melbourne', -2269, 60, 4349, 30, 'Victoria'
|
70
69
|
c.timezone 'Australia/Sydney', -508, 15, 9073, 60, 'New South Wales (most areas)'
|
71
70
|
c.timezone 'Australia/Broken_Hill', -639, 20, 2829, 20, 'New South Wales (Yancowinna)'
|
@@ -187,9 +186,9 @@ module TZInfo
|
|
187
186
|
c.timezone 'America/Creston', 491, 10, -6991, 60, 'MST - BC (Creston)'
|
188
187
|
c.timezone 'America/Dawson_Creek', 1793, 30, -3607, 30, 'MST - BC (Dawson Cr, Ft St John)'
|
189
188
|
c.timezone 'America/Fort_Nelson', 294, 5, -1227, 10, 'MST - BC (Ft Nelson)'
|
189
|
+
c.timezone 'America/Whitehorse', 3643, 60, -2701, 20, 'MST - Yukon (east)'
|
190
|
+
c.timezone 'America/Dawson', 961, 15, -1673, 12, 'MST - Yukon (west)'
|
190
191
|
c.timezone 'America/Vancouver', 739, 15, -7387, 60, 'Pacific - BC (most areas)'
|
191
|
-
c.timezone 'America/Whitehorse', 3643, 60, -2701, 20, 'Pacific - Yukon (south)'
|
192
|
-
c.timezone 'America/Dawson', 961, 15, -1673, 12, 'Pacific - Yukon (north)'
|
193
192
|
end
|
194
193
|
country 'CC', 'Cocos (Keeling) Islands' do |c|
|
195
194
|
c.timezone 'Indian/Cocos', -73, 6, 1163, 12
|
@@ -338,7 +337,7 @@ module TZInfo
|
|
338
337
|
c.timezone 'Europe/Gibraltar', 542, 15, -107, 20
|
339
338
|
end
|
340
339
|
country 'GL', 'Greenland' do |c|
|
341
|
-
c.timezone 'America/
|
340
|
+
c.timezone 'America/Nuuk', 3851, 60, -776, 15, 'Greenland (most areas)'
|
342
341
|
c.timezone 'America/Danmarkshavn', 2303, 30, -56, 3, 'National Park (east coast)'
|
343
342
|
c.timezone 'America/Scoresbysund', 4229, 60, -659, 30, 'Scoresbysund/Ittoqqortoormiit'
|
344
343
|
c.timezone 'America/Thule', 2297, 30, -4127, 60, 'Thule/Pituffik'
|
@@ -469,6 +468,7 @@ module TZInfo
|
|
469
468
|
country 'KZ', 'Kazakhstan' do |c|
|
470
469
|
c.timezone 'Asia/Almaty', 173, 4, 1539, 20, 'Kazakhstan (most areas)'
|
471
470
|
c.timezone 'Asia/Qyzylorda', 224, 5, 982, 15, 'Qyzylorda/Kyzylorda/Kzyl-Orda'
|
471
|
+
c.timezone 'Asia/Qostanay', 266, 5, 3817, 60, 'Qostanay/Kostanay/Kustanay'
|
472
472
|
c.timezone 'Asia/Aqtobe', 3017, 60, 343, 6, 'Aqtobe/Aktobe'
|
473
473
|
c.timezone 'Asia/Aqtau', 2671, 60, 754, 15, 'Mangghystau/Mankistau'
|
474
474
|
c.timezone 'Asia/Atyrau', 2827, 60, 779, 15, 'Atyrau/Atirau/Gur\'yev'
|
@@ -529,7 +529,7 @@ module TZInfo
|
|
529
529
|
c.timezone 'Pacific/Majuro', 143, 20, 856, 5, 'Marshall Islands (most areas)'
|
530
530
|
c.timezone 'Pacific/Kwajalein', 109, 12, 502, 3, 'Kwajalein'
|
531
531
|
end
|
532
|
-
country 'MK', 'Macedonia' do |c|
|
532
|
+
country 'MK', 'North Macedonia' do |c|
|
533
533
|
c.timezone 'Europe/Skopje', 2519, 60, 643, 30
|
534
534
|
end
|
535
535
|
country 'ML', 'Mali' do |c|
|
@@ -693,9 +693,8 @@ module TZInfo
|
|
693
693
|
country 'RU', 'Russia' do |c|
|
694
694
|
c.timezone 'Europe/Kaliningrad', 3283, 60, 41, 2, 'MSK-01 - Kaliningrad'
|
695
695
|
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
696
|
c.timezone 'Europe/Kirov', 293, 5, 993, 20, 'MSK+00 - Kirov'
|
697
|
+
c.timezone 'Europe/Volgograd', 731, 15, 533, 12, 'MSK+00 - Volgograd'
|
699
698
|
c.timezone 'Europe/Astrakhan', 927, 20, 961, 20, 'MSK+01 - Astrakhan'
|
700
699
|
c.timezone 'Europe/Saratov', 1547, 30, 1381, 30, 'MSK+01 - Saratov'
|
701
700
|
c.timezone 'Europe/Ulyanovsk', 163, 3, 242, 5, 'MSK+01 - Ulyanovsk'
|
@@ -782,7 +781,7 @@ module TZInfo
|
|
782
781
|
country 'SY', 'Syria' do |c|
|
783
782
|
c.timezone 'Asia/Damascus', 67, 2, 363, 10
|
784
783
|
end
|
785
|
-
country 'SZ', 'Swaziland' do |c|
|
784
|
+
country 'SZ', 'Eswatini (Swaziland)' do |c|
|
786
785
|
c.timezone 'Africa/Mbabane', -263, 10, 311, 10
|
787
786
|
end
|
788
787
|
country 'TC', 'Turks & Caicos Is' do |c|
|
@@ -834,9 +833,10 @@ module TZInfo
|
|
834
833
|
c.timezone 'Africa/Dar_es_Salaam', -34, 5, 2357, 60
|
835
834
|
end
|
836
835
|
country 'UA', 'Ukraine' do |c|
|
836
|
+
c.timezone 'Europe/Simferopol', 899, 20, 341, 10, 'Crimea'
|
837
837
|
c.timezone 'Europe/Kiev', 1513, 30, 1831, 60, 'Ukraine (most areas)'
|
838
|
-
c.timezone 'Europe/Uzhgorod', 2917, 60, 223, 10, '
|
839
|
-
c.timezone 'Europe/Zaporozhye', 287, 6, 211, 6, '
|
838
|
+
c.timezone 'Europe/Uzhgorod', 2917, 60, 223, 10, 'Transcarpathia'
|
839
|
+
c.timezone 'Europe/Zaporozhye', 287, 6, 211, 6, 'Zaporozhye and east Lugansk'
|
840
840
|
end
|
841
841
|
country 'UG', 'Uganda' do |c|
|
842
842
|
c.timezone 'Africa/Kampala', 19, 60, 389, 12
|
@@ -120,7 +120,7 @@ module TZInfo
|
|
120
120
|
linked_timezone 'America/Fort_Wayne'
|
121
121
|
timezone 'America/Fortaleza'
|
122
122
|
timezone 'America/Glace_Bay'
|
123
|
-
|
123
|
+
linked_timezone 'America/Godthab'
|
124
124
|
timezone 'America/Goose_Bay'
|
125
125
|
timezone 'America/Grand_Turk'
|
126
126
|
linked_timezone 'America/Grenada'
|
@@ -180,6 +180,7 @@ module TZInfo
|
|
180
180
|
timezone 'America/North_Dakota/Beulah'
|
181
181
|
timezone 'America/North_Dakota/Center'
|
182
182
|
timezone 'America/North_Dakota/New_Salem'
|
183
|
+
timezone 'America/Nuuk'
|
183
184
|
timezone 'America/Ojinaga'
|
184
185
|
timezone 'America/Panama'
|
185
186
|
timezone 'America/Pangnirtung'
|
@@ -306,6 +307,7 @@ module TZInfo
|
|
306
307
|
timezone 'Asia/Pontianak'
|
307
308
|
timezone 'Asia/Pyongyang'
|
308
309
|
timezone 'Asia/Qatar'
|
310
|
+
timezone 'Asia/Qostanay'
|
309
311
|
timezone 'Asia/Qyzylorda'
|
310
312
|
linked_timezone 'Asia/Rangoon'
|
311
313
|
timezone 'Asia/Riyadh'
|
@@ -353,7 +355,7 @@ module TZInfo
|
|
353
355
|
timezone 'Australia/Brisbane'
|
354
356
|
timezone 'Australia/Broken_Hill'
|
355
357
|
linked_timezone 'Australia/Canberra'
|
356
|
-
|
358
|
+
linked_timezone 'Australia/Currie'
|
357
359
|
timezone 'Australia/Darwin'
|
358
360
|
timezone 'Australia/Eucla'
|
359
361
|
timezone 'Australia/Hobart'
|
@@ -424,7 +426,7 @@ module TZInfo
|
|
424
426
|
timezone 'Etc/GMT-9'
|
425
427
|
linked_timezone 'Etc/GMT0'
|
426
428
|
linked_timezone 'Etc/Greenwich'
|
427
|
-
|
429
|
+
linked_timezone 'Etc/UCT'
|
428
430
|
timezone 'Etc/UTC'
|
429
431
|
linked_timezone 'Etc/Universal'
|
430
432
|
linked_timezone 'Etc/Zulu'
|
@@ -591,7 +593,6 @@ module TZInfo
|
|
591
593
|
linked_timezone 'US/Michigan'
|
592
594
|
linked_timezone 'US/Mountain'
|
593
595
|
linked_timezone 'US/Pacific'
|
594
|
-
linked_timezone 'US/Pacific-New'
|
595
596
|
linked_timezone 'US/Samoa'
|
596
597
|
linked_timezone 'UTC'
|
597
598
|
linked_timezone 'Universal'
|
data/lib/tzinfo/tzdataparser.rb
CHANGED
@@ -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,
|
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
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
|
@@ -53,48 +53,48 @@ class TCTimezoneMelbourne < Test::Unit::TestCase
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def test_1942
|
56
|
-
#Australia/Melbourne Sat Mar 28
|
57
|
-
#Australia/Melbourne Sat Mar 28
|
56
|
+
#Australia/Melbourne Sat Mar 28 15:59:59 1942 UTC = Sun Mar 29 02:59:59 1942 AEDT isdst=1 gmtoff=39600
|
57
|
+
#Australia/Melbourne Sat Mar 28 16:00:00 1942 UTC = Sun Mar 29 02:00:00 1942 AEST isdst=0 gmtoff=36000
|
58
58
|
#Australia/Melbourne Sat Sep 26 15:59:59 1942 UTC = Sun Sep 27 01:59:59 1942 AEST isdst=0 gmtoff=36000
|
59
59
|
#Australia/Melbourne Sat Sep 26 16:00:00 1942 UTC = Sun Sep 27 03:00:00 1942 AEDT isdst=1 gmtoff=39600
|
60
60
|
|
61
61
|
tz = Timezone.get('Australia/Melbourne')
|
62
|
-
assert_equal(DateTime.new(1942,3,29,
|
63
|
-
assert_equal(DateTime.new(1942,3,29,
|
62
|
+
assert_equal(DateTime.new(1942,3,29,2,59,59), tz.utc_to_local(DateTime.new(1942,3,28,15,59,59)))
|
63
|
+
assert_equal(DateTime.new(1942,3,29,2,0,0), tz.utc_to_local(DateTime.new(1942,3,28,16,0,0)))
|
64
64
|
assert_equal(DateTime.new(1942,9,27,1,59,59), tz.utc_to_local(DateTime.new(1942,9,26,15,59,59)))
|
65
65
|
assert_equal(DateTime.new(1942,9,27,3,0,0), tz.utc_to_local(DateTime.new(1942,9,26,16,0,0)))
|
66
66
|
|
67
|
-
assert_equal(DateTime.new(1942,3,28,
|
68
|
-
assert_equal(DateTime.new(1942,3,28,
|
69
|
-
assert_equal(DateTime.new(1942,3,28,
|
70
|
-
assert_equal(DateTime.new(1942,3,28,
|
67
|
+
assert_equal(DateTime.new(1942,3,28,15,59,59), tz.local_to_utc(DateTime.new(1942,3,29,2,59,59), true))
|
68
|
+
assert_equal(DateTime.new(1942,3,28,16,59,59), tz.local_to_utc(DateTime.new(1942,3,29,2,59,59), false))
|
69
|
+
assert_equal(DateTime.new(1942,3,28,15,0,0), tz.local_to_utc(DateTime.new(1942,3,29,2,0,0), true))
|
70
|
+
assert_equal(DateTime.new(1942,3,28,16,0,0), tz.local_to_utc(DateTime.new(1942,3,29,2,0,0), false))
|
71
71
|
assert_equal(DateTime.new(1942,9,26,15,59,59), tz.local_to_utc(DateTime.new(1942,9,27,1,59,59)))
|
72
72
|
assert_equal(DateTime.new(1942,9,26,16,0,0), tz.local_to_utc(DateTime.new(1942,9,27,3,0,0)))
|
73
73
|
|
74
74
|
assert_raises(PeriodNotFound) { tz.local_to_utc(DateTime.new(1942,9,27,2,0,0)) }
|
75
|
-
assert_raises(AmbiguousTime) { tz.local_to_utc(DateTime.new(1942,3,29,
|
75
|
+
assert_raises(AmbiguousTime) { tz.local_to_utc(DateTime.new(1942,3,29,2,0,0)) }
|
76
76
|
|
77
|
-
assert_equal(:AEDT, tz.period_for_utc(DateTime.new(1942,3,28,
|
78
|
-
assert_equal(:AEST, tz.period_for_utc(DateTime.new(1942,3,28,
|
77
|
+
assert_equal(:AEDT, tz.period_for_utc(DateTime.new(1942,3,28,15,59,59)).zone_identifier)
|
78
|
+
assert_equal(:AEST, tz.period_for_utc(DateTime.new(1942,3,28,16,0,0)).zone_identifier)
|
79
79
|
assert_equal(:AEST, tz.period_for_utc(DateTime.new(1942,9,26,15,59,59)).zone_identifier)
|
80
80
|
assert_equal(:AEDT, tz.period_for_utc(DateTime.new(1942,9,26,16,0,0)).zone_identifier)
|
81
81
|
|
82
|
-
assert_equal(:AEDT, tz.period_for_local(DateTime.new(1942,3,29,
|
83
|
-
assert_equal(:AEST, tz.period_for_local(DateTime.new(1942,3,29,
|
84
|
-
assert_equal(:AEDT, tz.period_for_local(DateTime.new(1942,3,29,
|
85
|
-
assert_equal(:AEST, tz.period_for_local(DateTime.new(1942,3,29,
|
82
|
+
assert_equal(:AEDT, tz.period_for_local(DateTime.new(1942,3,29,2,59,59), true).zone_identifier)
|
83
|
+
assert_equal(:AEST, tz.period_for_local(DateTime.new(1942,3,29,2,59,59), false).zone_identifier)
|
84
|
+
assert_equal(:AEDT, tz.period_for_local(DateTime.new(1942,3,29,2,0,0), true).zone_identifier)
|
85
|
+
assert_equal(:AEST, tz.period_for_local(DateTime.new(1942,3,29,2,0,0), false).zone_identifier)
|
86
86
|
assert_equal(:AEST, tz.period_for_local(DateTime.new(1942,9,27,1,59,59)).zone_identifier)
|
87
87
|
assert_equal(:AEDT, tz.period_for_local(DateTime.new(1942,9,27,3,0,0)).zone_identifier)
|
88
88
|
|
89
|
-
assert_equal(39600, tz.period_for_utc(DateTime.new(1942,3,28,
|
90
|
-
assert_equal(36000, tz.period_for_utc(DateTime.new(1942,3,28,
|
89
|
+
assert_equal(39600, tz.period_for_utc(DateTime.new(1942,3,28,15,59,59)).utc_total_offset)
|
90
|
+
assert_equal(36000, tz.period_for_utc(DateTime.new(1942,3,28,16,0,0)).utc_total_offset)
|
91
91
|
assert_equal(36000, tz.period_for_utc(DateTime.new(1942,9,26,15,59,59)).utc_total_offset)
|
92
92
|
assert_equal(39600, tz.period_for_utc(DateTime.new(1942,9,26,16,0,0)).utc_total_offset)
|
93
93
|
|
94
|
-
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,
|
95
|
-
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,
|
96
|
-
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,
|
97
|
-
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,
|
94
|
+
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,2,59,59), true).utc_total_offset)
|
95
|
+
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,2,59,59), false).utc_total_offset)
|
96
|
+
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,2,0,0), true).utc_total_offset)
|
97
|
+
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,2,0,0), false).utc_total_offset)
|
98
98
|
assert_equal(36000, tz.period_for_local(DateTime.new(1942,9,27,1,59,59)).utc_total_offset)
|
99
99
|
assert_equal(39600, tz.period_for_local(DateTime.new(1942,9,27,3,0,0)).utc_total_offset)
|
100
100
|
end
|