tzinfo 0.3.54 → 0.3.55
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 +6 -0
- data/lib/tzinfo/definitions/Africa/Casablanca.rb +4 -74
- data/lib/tzinfo/definitions/Africa/El_Aaiun.rb +4 -73
- data/lib/tzinfo/definitions/Africa/Windhoek.rb +24 -25
- data/lib/tzinfo/definitions/America/Santiago.rb +63 -63
- data/lib/tzinfo/definitions/Asia/Macau.rb +63 -31
- data/lib/tzinfo/definitions/Asia/Manila.rb +3 -3
- data/lib/tzinfo/definitions/Asia/Pyongyang.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Shanghai.rb +26 -16
- data/lib/tzinfo/definitions/Asia/Tokyo.rb +4 -4
- data/lib/tzinfo/definitions/Europe/Dublin.rb +159 -159
- data/lib/tzinfo/definitions/Europe/Prague.rb +6 -3
- data/lib/tzinfo/definitions/Europe/Volgograd.rb +1 -0
- data/lib/tzinfo/definitions/Pacific/Easter.rb +63 -63
- data/lib/tzinfo/definitions/Pacific/Fiji.rb +5 -5
- data/lib/tzinfo/definitions/Pacific/Honolulu.rb +6 -3
- data/lib/tzinfo/indexes/countries.rb +1 -1
- data/lib/tzinfo/tzdataparser.rb +17 -11
- data/tzinfo.gemspec +1 -1
- metadata +4 -4
@@ -115,69 +115,69 @@ module TZInfo
|
|
115
115
|
tz.transition 2017, 8, :o5, 1502596800
|
116
116
|
tz.transition 2018, 5, :o4, 1526180400
|
117
117
|
tz.transition 2018, 8, :o5, 1534046400
|
118
|
-
tz.transition 2019,
|
119
|
-
tz.transition 2019,
|
120
|
-
tz.transition 2020,
|
121
|
-
tz.transition 2020,
|
122
|
-
tz.transition 2021,
|
123
|
-
tz.transition 2021,
|
124
|
-
tz.transition 2022,
|
125
|
-
tz.transition 2022,
|
126
|
-
tz.transition 2023,
|
127
|
-
tz.transition 2023,
|
128
|
-
tz.transition 2024,
|
129
|
-
tz.transition 2024,
|
130
|
-
tz.transition 2025,
|
131
|
-
tz.transition 2025,
|
132
|
-
tz.transition 2026,
|
133
|
-
tz.transition 2026,
|
134
|
-
tz.transition 2027,
|
135
|
-
tz.transition 2027,
|
136
|
-
tz.transition 2028,
|
137
|
-
tz.transition 2028,
|
138
|
-
tz.transition 2029,
|
139
|
-
tz.transition 2029,
|
140
|
-
tz.transition 2030,
|
141
|
-
tz.transition 2030,
|
142
|
-
tz.transition 2031,
|
143
|
-
tz.transition 2031,
|
144
|
-
tz.transition 2032,
|
145
|
-
tz.transition 2032,
|
146
|
-
tz.transition 2033,
|
147
|
-
tz.transition 2033,
|
148
|
-
tz.transition 2034,
|
149
|
-
tz.transition 2034,
|
150
|
-
tz.transition 2035,
|
151
|
-
tz.transition 2035,
|
152
|
-
tz.transition 2036,
|
153
|
-
tz.transition 2036,
|
154
|
-
tz.transition 2037,
|
155
|
-
tz.transition 2037,
|
156
|
-
tz.transition 2038,
|
157
|
-
tz.transition 2038,
|
158
|
-
tz.transition 2039,
|
159
|
-
tz.transition 2039,
|
160
|
-
tz.transition 2040,
|
161
|
-
tz.transition 2040,
|
162
|
-
tz.transition 2041,
|
163
|
-
tz.transition 2041,
|
164
|
-
tz.transition 2042,
|
165
|
-
tz.transition 2042,
|
166
|
-
tz.transition 2043,
|
167
|
-
tz.transition 2043,
|
168
|
-
tz.transition 2044,
|
169
|
-
tz.transition 2044,
|
170
|
-
tz.transition 2045,
|
171
|
-
tz.transition 2045,
|
172
|
-
tz.transition 2046,
|
173
|
-
tz.transition 2046,
|
174
|
-
tz.transition 2047,
|
175
|
-
tz.transition 2047,
|
176
|
-
tz.transition 2048,
|
177
|
-
tz.transition 2048,
|
178
|
-
tz.transition 2049,
|
179
|
-
tz.transition 2049,
|
180
|
-
tz.transition 2050,
|
118
|
+
tz.transition 2019, 4, :o4, 1554606000
|
119
|
+
tz.transition 2019, 9, :o5, 1567915200
|
120
|
+
tz.transition 2020, 4, :o4, 1586055600
|
121
|
+
tz.transition 2020, 9, :o5, 1599364800
|
122
|
+
tz.transition 2021, 4, :o4, 1617505200
|
123
|
+
tz.transition 2021, 9, :o5, 1630814400
|
124
|
+
tz.transition 2022, 4, :o4, 1648954800
|
125
|
+
tz.transition 2022, 9, :o5, 1662264000
|
126
|
+
tz.transition 2023, 4, :o4, 1680404400
|
127
|
+
tz.transition 2023, 9, :o5, 1693713600
|
128
|
+
tz.transition 2024, 4, :o4, 1712458800
|
129
|
+
tz.transition 2024, 9, :o5, 1725768000
|
130
|
+
tz.transition 2025, 4, :o4, 1743908400
|
131
|
+
tz.transition 2025, 9, :o5, 1757217600
|
132
|
+
tz.transition 2026, 4, :o4, 1775358000
|
133
|
+
tz.transition 2026, 9, :o5, 1788667200
|
134
|
+
tz.transition 2027, 4, :o4, 1806807600
|
135
|
+
tz.transition 2027, 9, :o5, 1820116800
|
136
|
+
tz.transition 2028, 4, :o4, 1838257200
|
137
|
+
tz.transition 2028, 9, :o5, 1851566400
|
138
|
+
tz.transition 2029, 4, :o4, 1870311600
|
139
|
+
tz.transition 2029, 9, :o5, 1883016000
|
140
|
+
tz.transition 2030, 4, :o4, 1901761200
|
141
|
+
tz.transition 2030, 9, :o5, 1915070400
|
142
|
+
tz.transition 2031, 4, :o4, 1933210800
|
143
|
+
tz.transition 2031, 9, :o5, 1946520000
|
144
|
+
tz.transition 2032, 4, :o4, 1964660400
|
145
|
+
tz.transition 2032, 9, :o5, 1977969600
|
146
|
+
tz.transition 2033, 4, :o4, 1996110000
|
147
|
+
tz.transition 2033, 9, :o5, 2009419200
|
148
|
+
tz.transition 2034, 4, :o4, 2027559600
|
149
|
+
tz.transition 2034, 9, :o5, 2040868800
|
150
|
+
tz.transition 2035, 4, :o4, 2059614000
|
151
|
+
tz.transition 2035, 9, :o5, 2072318400
|
152
|
+
tz.transition 2036, 4, :o4, 2091063600
|
153
|
+
tz.transition 2036, 9, :o5, 2104372800
|
154
|
+
tz.transition 2037, 4, :o4, 2122513200
|
155
|
+
tz.transition 2037, 9, :o5, 2135822400
|
156
|
+
tz.transition 2038, 4, :o4, 19724141, 8
|
157
|
+
tz.transition 2038, 9, :o5, 7397015, 3
|
158
|
+
tz.transition 2039, 4, :o4, 19727053, 8
|
159
|
+
tz.transition 2039, 9, :o5, 7398107, 3
|
160
|
+
tz.transition 2040, 4, :o4, 19730021, 8
|
161
|
+
tz.transition 2040, 9, :o5, 7399199, 3
|
162
|
+
tz.transition 2041, 4, :o4, 19732933, 8
|
163
|
+
tz.transition 2041, 9, :o5, 7400312, 3
|
164
|
+
tz.transition 2042, 4, :o4, 19735845, 8
|
165
|
+
tz.transition 2042, 9, :o5, 7401404, 3
|
166
|
+
tz.transition 2043, 4, :o4, 19738757, 8
|
167
|
+
tz.transition 2043, 9, :o5, 7402496, 3
|
168
|
+
tz.transition 2044, 4, :o4, 19741669, 8
|
169
|
+
tz.transition 2044, 9, :o5, 7403588, 3
|
170
|
+
tz.transition 2045, 4, :o4, 19744581, 8
|
171
|
+
tz.transition 2045, 9, :o5, 7404680, 3
|
172
|
+
tz.transition 2046, 4, :o4, 19747549, 8
|
173
|
+
tz.transition 2046, 9, :o5, 7405772, 3
|
174
|
+
tz.transition 2047, 4, :o4, 19750461, 8
|
175
|
+
tz.transition 2047, 9, :o5, 7406885, 3
|
176
|
+
tz.transition 2048, 4, :o4, 19753373, 8
|
177
|
+
tz.transition 2048, 9, :o5, 7407977, 3
|
178
|
+
tz.transition 2049, 4, :o4, 19756285, 8
|
179
|
+
tz.transition 2049, 9, :o5, 7409069, 3
|
180
|
+
tz.transition 2050, 4, :o4, 19759197, 8
|
181
181
|
end
|
182
182
|
end
|
183
183
|
end
|
@@ -35,7 +35,7 @@ module TZInfo
|
|
35
35
|
tz.transition 2017, 11, :o2, 1509804000
|
36
36
|
tz.transition 2018, 1, :o1, 1515852000
|
37
37
|
tz.transition 2018, 11, :o2, 1541253600
|
38
|
-
tz.transition 2019, 1, :o1,
|
38
|
+
tz.transition 2019, 1, :o1, 1547301600
|
39
39
|
tz.transition 2019, 11, :o2, 1572703200
|
40
40
|
tz.transition 2020, 1, :o1, 1579356000
|
41
41
|
tz.transition 2020, 10, :o2, 1604152800
|
@@ -57,7 +57,7 @@ module TZInfo
|
|
57
57
|
tz.transition 2028, 11, :o2, 1856959200
|
58
58
|
tz.transition 2029, 1, :o1, 1863007200
|
59
59
|
tz.transition 2029, 11, :o2, 1888408800
|
60
|
-
tz.transition 2030, 1, :o1,
|
60
|
+
tz.transition 2030, 1, :o1, 1894456800
|
61
61
|
tz.transition 2030, 11, :o2, 1919858400
|
62
62
|
tz.transition 2031, 1, :o1, 1926511200
|
63
63
|
tz.transition 2031, 11, :o2, 1951308000
|
@@ -69,7 +69,7 @@ module TZInfo
|
|
69
69
|
tz.transition 2034, 11, :o2, 2046261600
|
70
70
|
tz.transition 2035, 1, :o1, 2052309600
|
71
71
|
tz.transition 2035, 11, :o2, 2077711200
|
72
|
-
tz.transition 2036, 1, :o1,
|
72
|
+
tz.transition 2036, 1, :o1, 2083759200
|
73
73
|
tz.transition 2036, 11, :o2, 2109160800
|
74
74
|
tz.transition 2037, 1, :o1, 2115813600
|
75
75
|
tz.transition 2037, 10, :o2, 2140610400
|
@@ -79,7 +79,7 @@ module TZInfo
|
|
79
79
|
tz.transition 2039, 11, :o2, 29593177, 12
|
80
80
|
tz.transition 2040, 1, :o1, 29594017, 12
|
81
81
|
tz.transition 2040, 11, :o2, 29597545, 12
|
82
|
-
tz.transition 2041, 1, :o1,
|
82
|
+
tz.transition 2041, 1, :o1, 29598385, 12
|
83
83
|
tz.transition 2041, 11, :o2, 29601913, 12
|
84
84
|
tz.transition 2042, 1, :o1, 29602837, 12
|
85
85
|
tz.transition 2042, 11, :o2, 29606281, 12
|
@@ -91,7 +91,7 @@ module TZInfo
|
|
91
91
|
tz.transition 2045, 11, :o2, 29619469, 12
|
92
92
|
tz.transition 2046, 1, :o1, 29620309, 12
|
93
93
|
tz.transition 2046, 11, :o2, 29623837, 12
|
94
|
-
tz.transition 2047, 1, :o1,
|
94
|
+
tz.transition 2047, 1, :o1, 29624677, 12
|
95
95
|
tz.transition 2047, 11, :o2, 29628205, 12
|
96
96
|
tz.transition 2048, 1, :o1, 29629129, 12
|
97
97
|
tz.transition 2048, 10, :o2, 29632573, 12
|
@@ -10,14 +10,17 @@ module TZInfo
|
|
10
10
|
tz.offset :o0, -37886, 0, :LMT
|
11
11
|
tz.offset :o1, -37800, 0, :HST
|
12
12
|
tz.offset :o2, -37800, 3600, :HDT
|
13
|
-
tz.offset :o3, -
|
13
|
+
tz.offset :o3, -37800, 3600, :HWT
|
14
|
+
tz.offset :o4, -37800, 3600, :HPT
|
15
|
+
tz.offset :o5, -36000, 0, :HST
|
14
16
|
|
15
17
|
tz.transition 1896, 1, :o1, 104266329343, 43200
|
16
18
|
tz.transition 1933, 4, :o2, 116505265, 48
|
17
19
|
tz.transition 1933, 5, :o1, 116506291, 48
|
18
|
-
tz.transition 1942, 2, :
|
20
|
+
tz.transition 1942, 2, :o3, 116659201, 48
|
21
|
+
tz.transition 1945, 8, :o4, 58360379, 24
|
19
22
|
tz.transition 1945, 9, :o1, 116722991, 48
|
20
|
-
tz.transition 1947, 6, :
|
23
|
+
tz.transition 1947, 6, :o5, 116752561, 48
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
@@ -544,7 +544,7 @@ module TZInfo
|
|
544
544
|
c.timezone 'Asia/Choibalsan', 721, 15, 229, 2, 'Dornod, Sukhbaatar'
|
545
545
|
end
|
546
546
|
country 'MO', 'Macau' do |c|
|
547
|
-
c.timezone 'Asia/Macau',
|
547
|
+
c.timezone 'Asia/Macau', 7991, 360, 2725, 24
|
548
548
|
end
|
549
549
|
country 'MP', 'Northern Mariana Islands' do |c|
|
550
550
|
c.timezone 'Pacific/Saipan', 76, 5, 583, 4
|
data/lib/tzinfo/tzdataparser.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2005-
|
2
|
+
# Copyright (c) 2005-2018 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
|
@@ -227,7 +227,7 @@ module TZInfo
|
|
227
227
|
def get_rules(ref)
|
228
228
|
if ref == '-'
|
229
229
|
@no_rules
|
230
|
-
elsif ref =~
|
230
|
+
elsif ref =~ /^-?[0-9]+:[0-9]+$/
|
231
231
|
TZDataFixedOffsetRules.new(TZDataParser.parse_offset(ref))
|
232
232
|
else
|
233
233
|
rule_set = @rule_sets[ref]
|
@@ -993,8 +993,8 @@ module TZInfo
|
|
993
993
|
end
|
994
994
|
end
|
995
995
|
|
996
|
-
# A tz data time definition -
|
997
|
-
#
|
996
|
+
# A tz data time definition - a sign (1 or -1), hour, minute, second and
|
997
|
+
# reference (:utc, :standard or :wall_clock).
|
998
998
|
#
|
999
999
|
# @private
|
1000
1000
|
class TZDataTime #:nodoc:
|
@@ -1004,15 +1004,16 @@ module TZInfo
|
|
1004
1004
|
attr_reader :ref
|
1005
1005
|
|
1006
1006
|
def initialize(spec)
|
1007
|
-
raise "Invalid time: #{spec}" if spec !~ /^([0-9]+)(:([0-9]+)(:([0-9]+))?)?([wguzs])?$/
|
1007
|
+
raise "Invalid time: #{spec}" if spec !~ /^(-?)([0-9]+)(:([0-9]+)(:([0-9]+))?)?([wguzs])?$/
|
1008
1008
|
|
1009
|
-
@
|
1010
|
-
@
|
1011
|
-
@
|
1009
|
+
@sign = $1 == '-' ? -1 : 1
|
1010
|
+
@hour = $2.to_i
|
1011
|
+
@minute = $4.nil? ? 0 : $4.to_i
|
1012
|
+
@second = $6.nil? ? 0 : $6.to_i
|
1012
1013
|
|
1013
|
-
if $
|
1014
|
+
if $7 == 's'
|
1014
1015
|
@ref = :standard
|
1015
|
-
elsif $
|
1016
|
+
elsif $7 == 'g' || $7 == 'u' || $7 == 'z'
|
1016
1017
|
@ref = :utc
|
1017
1018
|
else
|
1018
1019
|
@ref = :wall_clock
|
@@ -1021,7 +1022,12 @@ module TZInfo
|
|
1021
1022
|
|
1022
1023
|
# Converts the time to UTC given a utc_offset and std_offset.
|
1023
1024
|
def to_utc(utc_offset, std_offset, year, month, day)
|
1024
|
-
result =
|
1025
|
+
result = if @hour > 24 || @hour == 24 && (@minute > 0 || @second > 0) || @sign != 1
|
1026
|
+
DateTime.new(year, month, day, 0, 0, 0) + Rational(@sign * (@second + (@minute + @hour * 60) * 60), 86400)
|
1027
|
+
else
|
1028
|
+
DateTime.new(year, month, day, @hour, @minute, @second)
|
1029
|
+
end
|
1030
|
+
|
1025
1031
|
offset = 0
|
1026
1032
|
offset = offset + utc_offset if @ref == :standard || @ref == :wall_clock
|
1027
1033
|
offset = offset + std_offset if @ref == :wall_clock
|
data/tzinfo.gemspec
CHANGED
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:
|
4
|
+
hash: 125
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 55
|
10
|
+
version: 0.3.55
|
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-
|
18
|
+
date: 2018-10-26 16:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|