tzinfo 0.3.58 → 0.3.59
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/Accra.rb +63 -47
- data/lib/tzinfo/definitions/Africa/Lagos.rb +8 -3
- data/lib/tzinfo/definitions/Africa/Nairobi.rb +7 -6
- data/lib/tzinfo/definitions/America/Belize.rb +50 -5
- data/lib/tzinfo/definitions/America/Grand_Turk.rb +1 -2
- data/lib/tzinfo/definitions/America/Nassau.rb +95 -88
- data/lib/tzinfo/definitions/Antarctica/Macquarie.rb +1 -1
- data/lib/tzinfo/definitions/Asia/Gaza.rb +15 -13
- data/lib/tzinfo/definitions/Asia/Hebron.rb +15 -13
- data/lib/tzinfo/definitions/Asia/Jerusalem.rb +29 -27
- 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/Europe/Volgograd.rb +1 -0
- data/lib/tzinfo/definitions/Indian/Mahe.rb +1 -1
- data/lib/tzinfo/definitions/Pacific/Efate.rb +3 -1
- data/lib/tzinfo/indexes/countries.rb +4 -5
- data/lib/tzinfo/indexes/timezones.rb +1 -1
- data/test/tc_timezone_melbourne.rb +21 -21
- data/tzinfo.gemspec +1 -1
- metadata +4 -4
@@ -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
|
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: 101
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 59
|
10
|
+
version: 0.3.59
|
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: 2020-
|
18
|
+
date: 2020-12-23 16:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|