tzinfo 0.3.60 → 0.3.61
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +10 -0
- data/LICENSE +1 -1
- data/lib/tzinfo/country.rb +3 -0
- data/lib/tzinfo/definitions/Africa/Accra.rb +1 -69
- data/lib/tzinfo/definitions/America/Anguilla.rb +1 -1
- data/lib/tzinfo/definitions/America/Antigua.rb +1 -1
- data/lib/tzinfo/definitions/America/Aruba.rb +1 -1
- data/lib/tzinfo/definitions/America/Atikokan.rb +1 -16
- data/lib/tzinfo/definitions/America/Barbados.rb +18 -13
- data/lib/tzinfo/definitions/America/Blanc__m__Sablon.rb +1 -14
- data/lib/tzinfo/definitions/America/Coral_Harbour.rb +1 -1
- data/lib/tzinfo/definitions/America/Creston.rb +1 -9
- data/lib/tzinfo/definitions/America/Curacao.rb +1 -8
- data/lib/tzinfo/definitions/America/Dominica.rb +1 -1
- data/lib/tzinfo/definitions/America/Grenada.rb +1 -1
- data/lib/tzinfo/definitions/America/Guadeloupe.rb +1 -1
- data/lib/tzinfo/definitions/America/Guyana.rb +8 -7
- data/lib/tzinfo/definitions/America/Kralendijk.rb +1 -1
- data/lib/tzinfo/definitions/America/Lower_Princes.rb +1 -1
- data/lib/tzinfo/definitions/America/Marigot.rb +1 -1
- data/lib/tzinfo/definitions/America/Montserrat.rb +1 -1
- data/lib/tzinfo/definitions/America/Nassau.rb +1 -188
- data/lib/tzinfo/definitions/America/Port_of_Spain.rb +1 -6
- data/lib/tzinfo/definitions/America/Punta_Arenas.rb +4 -4
- data/lib/tzinfo/definitions/America/Santiago.rb +6 -6
- data/lib/tzinfo/definitions/America/St_Barthelemy.rb +1 -1
- data/lib/tzinfo/definitions/America/St_Kitts.rb +1 -1
- data/lib/tzinfo/definitions/America/St_Lucia.rb +1 -1
- data/lib/tzinfo/definitions/America/St_Thomas.rb +1 -1
- data/lib/tzinfo/definitions/America/St_Vincent.rb +1 -1
- data/lib/tzinfo/definitions/America/Tortola.rb +1 -1
- data/lib/tzinfo/definitions/America/Virgin.rb +1 -1
- data/lib/tzinfo/definitions/Antarctica/DumontDUrville.rb +1 -8
- data/lib/tzinfo/definitions/Antarctica/Syowa.rb +1 -6
- data/lib/tzinfo/definitions/Asia/Amman.rb +29 -29
- data/lib/tzinfo/definitions/Asia/Gaza.rb +59 -59
- data/lib/tzinfo/definitions/Asia/Hebron.rb +59 -59
- data/lib/tzinfo/definitions/Atlantic/Azores.rb +2 -0
- data/lib/tzinfo/definitions/Atlantic/Madeira.rb +2 -0
- data/lib/tzinfo/definitions/Europe/Kiev.rb +9 -9
- data/lib/tzinfo/definitions/Europe/Lisbon.rb +2 -0
- data/lib/tzinfo/definitions/Europe/Simferopol.rb +5 -5
- data/lib/tzinfo/definitions/Europe/Uzhgorod.rb +9 -9
- data/lib/tzinfo/definitions/Europe/Zaporozhye.rb +9 -9
- data/lib/tzinfo/definitions/Pacific/Apia.rb +0 -58
- data/lib/tzinfo/definitions/Pacific/Enderbury.rb +1 -10
- data/lib/tzinfo/definitions/Pacific/Fiji.rb +0 -2
- data/lib/tzinfo/definitions/Pacific/Kanton.rb +22 -0
- data/lib/tzinfo/definitions/Pacific/Niue.rb +3 -5
- data/lib/tzinfo/definitions/Pacific/Rarotonga.rb +33 -31
- data/lib/tzinfo/definitions/Pacific/Tongatapu.rb +3 -3
- data/lib/tzinfo/indexes/countries.rb +2 -2
- data/lib/tzinfo/indexes/timezones.rb +11 -10
- data/lib/tzinfo/time_or_datetime.rb +8 -0
- data/lib/tzinfo/timezone.rb +5 -2
- data/lib/tzinfo/tzdataparser.rb +1 -1
- data/test/in_load_path/payload.rb +1 -0
- data/test/tc_country.rb +4 -0
- data/test/tc_time_or_datetime.rb +6 -0
- data/test/tc_timezone.rb +10 -1
- data/tzinfo.gemspec +1 -1
- metadata +7 -4
@@ -40,8 +40,6 @@ module TZInfo
|
|
40
40
|
tz.transition 2020, 1, :o1, 1578751200
|
41
41
|
tz.transition 2020, 12, :o2, 1608386400
|
42
42
|
tz.transition 2021, 1, :o1, 1610805600
|
43
|
-
tz.transition 2021, 11, :o2, 1636812000
|
44
|
-
tz.transition 2022, 1, :o1, 1642255200
|
45
43
|
tz.transition 2022, 11, :o2, 1668261600
|
46
44
|
tz.transition 2023, 1, :o1, 1673704800
|
47
45
|
tz.transition 2023, 11, :o2, 1699711200
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module TZInfo
|
4
|
+
module Definitions
|
5
|
+
module Pacific
|
6
|
+
module Kanton
|
7
|
+
include TimezoneDefinition
|
8
|
+
|
9
|
+
timezone 'Pacific/Kanton' do |tz|
|
10
|
+
tz.offset :o0, 0, 0, :'-00'
|
11
|
+
tz.offset :o1, -43200, 0, :'-12'
|
12
|
+
tz.offset :o2, -39600, 0, :'-11'
|
13
|
+
tz.offset :o3, 46800, 0, :'+13'
|
14
|
+
|
15
|
+
tz.transition 1937, 8, :o1, 4857553, 2
|
16
|
+
tz.transition 1979, 10, :o2, 307627200
|
17
|
+
tz.transition 1994, 12, :o3, 788871600
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -9,12 +9,10 @@ module TZInfo
|
|
9
9
|
timezone 'Pacific/Niue' do |tz|
|
10
10
|
tz.offset :o0, -40780, 0, :LMT
|
11
11
|
tz.offset :o1, -40800, 0, :'-1120'
|
12
|
-
tz.offset :o2, -
|
13
|
-
tz.offset :o3, -39600, 0, :'-11'
|
12
|
+
tz.offset :o2, -39600, 0, :'-11'
|
14
13
|
|
15
|
-
tz.transition
|
16
|
-
tz.transition
|
17
|
-
tz.transition 1978, 10, :o3, 276089400
|
14
|
+
tz.transition 1952, 10, :o1, 10516184519, 4320
|
15
|
+
tz.transition 1964, 7, :o2, 87788807, 36
|
18
16
|
end
|
19
17
|
end
|
20
18
|
end
|
@@ -7,38 +7,40 @@ module TZInfo
|
|
7
7
|
include TimezoneDefinition
|
8
8
|
|
9
9
|
timezone 'Pacific/Rarotonga' do |tz|
|
10
|
-
tz.offset :o0,
|
11
|
-
tz.offset :o1, -
|
12
|
-
tz.offset :o2, -
|
13
|
-
tz.offset :o3, -36000,
|
10
|
+
tz.offset :o0, 48056, 0, :LMT
|
11
|
+
tz.offset :o1, -38344, 0, :LMT
|
12
|
+
tz.offset :o2, -37800, 0, :'-1030'
|
13
|
+
tz.offset :o3, -36000, 1800, :'-0930'
|
14
|
+
tz.offset :o4, -36000, 0, :'-10'
|
14
15
|
|
15
|
-
tz.transition
|
16
|
-
tz.transition
|
17
|
-
tz.transition
|
18
|
-
tz.transition 1979,
|
19
|
-
tz.transition
|
20
|
-
tz.transition 1980,
|
21
|
-
tz.transition
|
22
|
-
tz.transition 1981,
|
23
|
-
tz.transition
|
24
|
-
tz.transition 1982,
|
25
|
-
tz.transition
|
26
|
-
tz.transition 1983,
|
27
|
-
tz.transition
|
28
|
-
tz.transition 1984,
|
29
|
-
tz.transition
|
30
|
-
tz.transition 1985,
|
31
|
-
tz.transition
|
32
|
-
tz.transition 1986,
|
33
|
-
tz.transition
|
34
|
-
tz.transition 1987,
|
35
|
-
tz.transition
|
36
|
-
tz.transition 1988,
|
37
|
-
tz.transition
|
38
|
-
tz.transition 1989,
|
39
|
-
tz.transition
|
40
|
-
tz.transition 1990,
|
41
|
-
tz.transition
|
16
|
+
tz.transition 1899, 12, :o1, 26082150593, 10800
|
17
|
+
tz.transition 1952, 10, :o2, 26290460993, 10800
|
18
|
+
tz.transition 1978, 11, :o3, 279714600
|
19
|
+
tz.transition 1979, 3, :o4, 289387800
|
20
|
+
tz.transition 1979, 10, :o3, 309952800
|
21
|
+
tz.transition 1980, 3, :o4, 320837400
|
22
|
+
tz.transition 1980, 10, :o3, 341402400
|
23
|
+
tz.transition 1981, 3, :o4, 352287000
|
24
|
+
tz.transition 1981, 10, :o3, 372852000
|
25
|
+
tz.transition 1982, 3, :o4, 384341400
|
26
|
+
tz.transition 1982, 10, :o3, 404906400
|
27
|
+
tz.transition 1983, 3, :o4, 415791000
|
28
|
+
tz.transition 1983, 10, :o3, 436356000
|
29
|
+
tz.transition 1984, 3, :o4, 447240600
|
30
|
+
tz.transition 1984, 10, :o3, 467805600
|
31
|
+
tz.transition 1985, 3, :o4, 478690200
|
32
|
+
tz.transition 1985, 10, :o3, 499255200
|
33
|
+
tz.transition 1986, 3, :o4, 510139800
|
34
|
+
tz.transition 1986, 10, :o3, 530704800
|
35
|
+
tz.transition 1987, 3, :o4, 541589400
|
36
|
+
tz.transition 1987, 10, :o3, 562154400
|
37
|
+
tz.transition 1988, 3, :o4, 573643800
|
38
|
+
tz.transition 1988, 10, :o3, 594208800
|
39
|
+
tz.transition 1989, 3, :o4, 605093400
|
40
|
+
tz.transition 1989, 10, :o3, 625658400
|
41
|
+
tz.transition 1990, 3, :o4, 636543000
|
42
|
+
tz.transition 1990, 10, :o3, 657108000
|
43
|
+
tz.transition 1991, 3, :o4, 667992600
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
@@ -7,13 +7,13 @@ module TZInfo
|
|
7
7
|
include TimezoneDefinition
|
8
8
|
|
9
9
|
timezone 'Pacific/Tongatapu' do |tz|
|
10
|
-
tz.offset :o0,
|
10
|
+
tz.offset :o0, 44352, 0, :LMT
|
11
11
|
tz.offset :o1, 44400, 0, :'+1220'
|
12
12
|
tz.offset :o2, 46800, 0, :'+13'
|
13
13
|
tz.offset :o3, 46800, 3600, :'+14'
|
14
14
|
|
15
|
-
tz.transition
|
16
|
-
tz.transition
|
15
|
+
tz.transition 1945, 9, :o1, 182378099, 75
|
16
|
+
tz.transition 1960, 12, :o2, 175485599, 72
|
17
17
|
tz.transition 1999, 10, :o3, 939214800
|
18
18
|
tz.transition 2000, 3, :o2, 953384400
|
19
19
|
tz.transition 2000, 11, :o3, 973342800
|
@@ -444,7 +444,7 @@ module TZInfo
|
|
444
444
|
end
|
445
445
|
country 'KI', 'Kiribati' do |c|
|
446
446
|
c.timezone 'Pacific/Tarawa', 17, 12, 173, 1, 'Gilbert Islands'
|
447
|
-
c.timezone 'Pacific/
|
447
|
+
c.timezone 'Pacific/Kanton', -167, 60, -10303, 60, 'Phoenix Islands'
|
448
448
|
c.timezone 'Pacific/Kiritimati', 28, 15, -472, 3, 'Line Islands'
|
449
449
|
end
|
450
450
|
country 'KM', 'Comoros' do |c|
|
@@ -815,7 +815,7 @@ module TZInfo
|
|
815
815
|
c.timezone 'Africa/Tunis', 184, 5, 611, 60
|
816
816
|
end
|
817
817
|
country 'TO', 'Tonga' do |c|
|
818
|
-
c.timezone 'Pacific/Tongatapu', -
|
818
|
+
c.timezone 'Pacific/Tongatapu', -317, 15, -876, 5
|
819
819
|
end
|
820
820
|
country 'TR', 'Turkey' do |c|
|
821
821
|
c.timezone 'Europe/Istanbul', 2461, 60, 869, 30
|
@@ -6,7 +6,7 @@ module TZInfo
|
|
6
6
|
include TimezoneIndexDefinition
|
7
7
|
|
8
8
|
timezone 'Africa/Abidjan'
|
9
|
-
|
9
|
+
linked_timezone 'Africa/Accra'
|
10
10
|
linked_timezone 'Africa/Addis_Ababa'
|
11
11
|
timezone 'Africa/Algiers'
|
12
12
|
linked_timezone 'Africa/Asmara'
|
@@ -79,14 +79,14 @@ module TZInfo
|
|
79
79
|
timezone 'America/Argentina/Ushuaia'
|
80
80
|
linked_timezone 'America/Aruba'
|
81
81
|
timezone 'America/Asuncion'
|
82
|
-
|
82
|
+
linked_timezone 'America/Atikokan'
|
83
83
|
linked_timezone 'America/Atka'
|
84
84
|
timezone 'America/Bahia'
|
85
85
|
timezone 'America/Bahia_Banderas'
|
86
86
|
timezone 'America/Barbados'
|
87
87
|
timezone 'America/Belem'
|
88
88
|
timezone 'America/Belize'
|
89
|
-
|
89
|
+
linked_timezone 'America/Blanc-Sablon'
|
90
90
|
timezone 'America/Boa_Vista'
|
91
91
|
timezone 'America/Bogota'
|
92
92
|
timezone 'America/Boise'
|
@@ -103,9 +103,9 @@ module TZInfo
|
|
103
103
|
linked_timezone 'America/Coral_Harbour'
|
104
104
|
linked_timezone 'America/Cordoba'
|
105
105
|
timezone 'America/Costa_Rica'
|
106
|
-
|
106
|
+
linked_timezone 'America/Creston'
|
107
107
|
timezone 'America/Cuiaba'
|
108
|
-
|
108
|
+
linked_timezone 'America/Curacao'
|
109
109
|
timezone 'America/Danmarkshavn'
|
110
110
|
timezone 'America/Dawson'
|
111
111
|
timezone 'America/Dawson_Creek'
|
@@ -172,7 +172,7 @@ module TZInfo
|
|
172
172
|
timezone 'America/Montevideo'
|
173
173
|
linked_timezone 'America/Montreal'
|
174
174
|
linked_timezone 'America/Montserrat'
|
175
|
-
|
175
|
+
linked_timezone 'America/Nassau'
|
176
176
|
timezone 'America/New_York'
|
177
177
|
timezone 'America/Nipigon'
|
178
178
|
timezone 'America/Nome'
|
@@ -187,7 +187,7 @@ module TZInfo
|
|
187
187
|
timezone 'America/Paramaribo'
|
188
188
|
timezone 'America/Phoenix'
|
189
189
|
timezone 'America/Port-au-Prince'
|
190
|
-
|
190
|
+
linked_timezone 'America/Port_of_Spain'
|
191
191
|
linked_timezone 'America/Porto_Acre'
|
192
192
|
timezone 'America/Porto_Velho'
|
193
193
|
timezone 'America/Puerto_Rico'
|
@@ -228,14 +228,14 @@ module TZInfo
|
|
228
228
|
timezone 'America/Yellowknife'
|
229
229
|
timezone 'Antarctica/Casey'
|
230
230
|
timezone 'Antarctica/Davis'
|
231
|
-
|
231
|
+
linked_timezone 'Antarctica/DumontDUrville'
|
232
232
|
timezone 'Antarctica/Macquarie'
|
233
233
|
timezone 'Antarctica/Mawson'
|
234
234
|
linked_timezone 'Antarctica/McMurdo'
|
235
235
|
timezone 'Antarctica/Palmer'
|
236
236
|
timezone 'Antarctica/Rothera'
|
237
237
|
linked_timezone 'Antarctica/South_Pole'
|
238
|
-
|
238
|
+
linked_timezone 'Antarctica/Syowa'
|
239
239
|
timezone 'Antarctica/Troll'
|
240
240
|
timezone 'Antarctica/Vostok'
|
241
241
|
linked_timezone 'Arctic/Longyearbyen'
|
@@ -539,7 +539,7 @@ module TZInfo
|
|
539
539
|
timezone 'Pacific/Chuuk'
|
540
540
|
timezone 'Pacific/Easter'
|
541
541
|
timezone 'Pacific/Efate'
|
542
|
-
|
542
|
+
linked_timezone 'Pacific/Enderbury'
|
543
543
|
timezone 'Pacific/Fakaofo'
|
544
544
|
timezone 'Pacific/Fiji'
|
545
545
|
timezone 'Pacific/Funafuti'
|
@@ -549,6 +549,7 @@ module TZInfo
|
|
549
549
|
timezone 'Pacific/Guam'
|
550
550
|
timezone 'Pacific/Honolulu'
|
551
551
|
linked_timezone 'Pacific/Johnston'
|
552
|
+
timezone 'Pacific/Kanton'
|
552
553
|
timezone 'Pacific/Kiritimati'
|
553
554
|
timezone 'Pacific/Kosrae'
|
554
555
|
timezone 'Pacific/Kwajalein'
|
@@ -178,7 +178,15 @@ module TZInfo
|
|
178
178
|
# receiver is less than, equal to, or greater than timeOrDateTime.
|
179
179
|
#
|
180
180
|
# Milliseconds and smaller units are ignored in the comparison.
|
181
|
+
#
|
182
|
+
# Returns nil if the passed in timeOrDateTime is not comparable with
|
183
|
+
# TimeOrDateTime instances.
|
181
184
|
def <=>(timeOrDateTime)
|
185
|
+
return nil unless timeOrDateTime.is_a?(TimeOrDateTime) ||
|
186
|
+
timeOrDateTime.is_a?(Time) ||
|
187
|
+
timeOrDateTime.is_a?(DateTime) ||
|
188
|
+
timeOrDateTime.respond_to?(:to_i)
|
189
|
+
|
182
190
|
if timeOrDateTime.is_a?(TimeOrDateTime)
|
183
191
|
orig = timeOrDateTime.to_orig
|
184
192
|
|
data/lib/tzinfo/timezone.rb
CHANGED
@@ -101,7 +101,7 @@ module TZInfo
|
|
101
101
|
def self.get(identifier)
|
102
102
|
instance = @@loaded_zones[identifier]
|
103
103
|
unless instance
|
104
|
-
raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~
|
104
|
+
raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /\A[A-Za-z0-9+\-_]+(\/[A-Za-z0-9+\-_]+)*\z/
|
105
105
|
identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__')
|
106
106
|
begin
|
107
107
|
# Use a temporary variable to avoid an rdoc warning
|
@@ -498,10 +498,13 @@ module TZInfo
|
|
498
498
|
|
499
499
|
# Compares two Timezones based on their identifier. Returns -1 if tz is less
|
500
500
|
# than self, 0 if tz is equal to self and +1 if tz is greater than self.
|
501
|
+
#
|
502
|
+
# Returns nil if tz is not comparable with Timezone instances.
|
501
503
|
def <=>(tz)
|
504
|
+
return nil unless tz.is_a?(Timezone)
|
502
505
|
identifier <=> tz.identifier
|
503
506
|
end
|
504
|
-
|
507
|
+
|
505
508
|
# Returns true if and only if the identifier of tz is equal to the
|
506
509
|
# identifier of this Timezone.
|
507
510
|
def eql?(tz)
|
data/lib/tzinfo/tzdataparser.rb
CHANGED
@@ -107,7 +107,7 @@ module TZInfo
|
|
107
107
|
|
108
108
|
files = Dir.entries(@input_dir).select do |file|
|
109
109
|
file =~ /\A[^\.]+\z/ &&
|
110
|
-
!%w(backzone calendars leapseconds version CONTRIBUTING LICENSE Makefile NEWS README SOURCE Theory version).include?(file) &&
|
110
|
+
!%w(backzone calendars leapseconds version CONTRIBUTING LICENSE Makefile NEWS README SECURITY SOURCE Theory version).include?(file) &&
|
111
111
|
File.file?(File.join(@input_dir, file))
|
112
112
|
end
|
113
113
|
|
@@ -0,0 +1 @@
|
|
1
|
+
raise 'This should never be executed'
|
data/test/tc_country.rb
CHANGED
@@ -114,6 +114,10 @@ class TCCountry < Test::Unit::TestCase
|
|
114
114
|
assert_equal(1, Country.get('US') <=> Country.get('FR'))
|
115
115
|
end
|
116
116
|
|
117
|
+
def test_compare_non_comparable
|
118
|
+
assert_nil(Country.get('GB') <=> Object.new)
|
119
|
+
end
|
120
|
+
|
117
121
|
def test_equality
|
118
122
|
assert_equal(true, Country.get('GB') == Country.get('GB'))
|
119
123
|
assert_equal(false, Country.get('GB') == Country.get('US'))
|
data/test/tc_time_or_datetime.rb
CHANGED
@@ -276,6 +276,12 @@ class TCTimeOrDateTime < Test::Unit::TestCase
|
|
276
276
|
assert_equal(1, TimeOrDateTime.new(1143214323) <=> '1111678323')
|
277
277
|
end
|
278
278
|
|
279
|
+
def test_compare_non_comparable
|
280
|
+
assert_nil(TimeOrDateTime.new(Time.utc(2006, 3, 24, 15, 32, 3)) <=> Object.new)
|
281
|
+
assert_nil(TimeOrDateTime.new(DateTime.new(2006, 3, 24, 15, 32, 3)) <=> Object.new)
|
282
|
+
assert_nil(TimeOrDateTime.new(1143214323) <=> Object.new)
|
283
|
+
end
|
284
|
+
|
279
285
|
def test_eql
|
280
286
|
assert_equal(true, TimeOrDateTime.new(Time.utc(2006, 3, 24, 15, 32, 3)).eql?(TimeOrDateTime.new(Time.utc(2006, 3, 24, 15, 32, 3))))
|
281
287
|
assert_equal(false, TimeOrDateTime.new(Time.utc(2006, 3, 24, 15, 32, 3)).eql?(TimeOrDateTime.new(DateTime.new(2006, 3, 24, 15, 32, 3))))
|
data/test/tc_timezone.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), "in_load_path")
|
2
3
|
require 'test/unit'
|
3
4
|
require File.join(File.dirname(__FILE__), 'test_utils')
|
4
5
|
require 'tzinfo'
|
@@ -97,7 +98,11 @@ class TCTimezone < Test::Unit::TestCase
|
|
97
98
|
end
|
98
99
|
|
99
100
|
def test_get_invalid
|
100
|
-
assert_raises(InvalidTimezoneIdentifier) { Timezone.get('../
|
101
|
+
assert_raises(InvalidTimezoneIdentifier) { Timezone.get('../definitions/UTC') }
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_get_directory_traversal
|
105
|
+
assert_raises(InvalidTimezoneIdentifier) { Timezone.get("foo\n/../../../payload") }
|
101
106
|
end
|
102
107
|
|
103
108
|
def test_get_nil
|
@@ -907,6 +912,10 @@ class TCTimezone < Test::Unit::TestCase
|
|
907
912
|
assert_equal(1, TestTimezone.new('Europe/Paris') <=> TestTimezone.new('America/New_York'))
|
908
913
|
end
|
909
914
|
|
915
|
+
def test_compare_non_comparable
|
916
|
+
assert_nil(TestTimezone.new('Europe/London') <=> Object.new)
|
917
|
+
end
|
918
|
+
|
910
919
|
def test_equality
|
911
920
|
assert_equal(true, TestTimezone.new('Europe/London') == TestTimezone.new('Europe/London'))
|
912
921
|
assert_equal(false, TestTimezone.new('Europe/London') == TestTimezone.new('Europe/london'))
|
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: 105
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 61
|
10
|
+
version: 0.3.61
|
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:
|
18
|
+
date: 2022-07-18 16:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -206,6 +206,7 @@ files:
|
|
206
206
|
- lib/tzinfo/definitions/Etc/GMT__p__9.rb
|
207
207
|
- lib/tzinfo/definitions/Etc/GMT__m__13.rb
|
208
208
|
- lib/tzinfo/definitions/Etc/GMT__m__3.rb
|
209
|
+
- lib/tzinfo/definitions/Pacific/Kanton.rb
|
209
210
|
- lib/tzinfo/definitions/Pacific/Fiji.rb
|
210
211
|
- lib/tzinfo/definitions/Pacific/Tongatapu.rb
|
211
212
|
- lib/tzinfo/definitions/Pacific/Guam.rb
|
@@ -678,6 +679,7 @@ files:
|
|
678
679
|
- test/test_utils.rb
|
679
680
|
- test/tc_ruby_core_support.rb
|
680
681
|
- test/tc_timezone_info.rb
|
682
|
+
- test/in_load_path/payload.rb
|
681
683
|
- test/tc_country.rb
|
682
684
|
has_rdoc: true
|
683
685
|
homepage: http://tzinfo.github.io
|
@@ -742,4 +744,5 @@ test_files:
|
|
742
744
|
- test/test_utils.rb
|
743
745
|
- test/tc_ruby_core_support.rb
|
744
746
|
- test/tc_timezone_info.rb
|
747
|
+
- test/in_load_path/payload.rb
|
745
748
|
- test/tc_country.rb
|