timezone 1.3.6 → 1.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.markdown +20 -0
- data/CONTRIBUTING.markdown +8 -2
- data/Rakefile +3 -1
- data/benchmark.rb +16 -29
- data/data/Africa/Accra +61 -47
- data/data/Africa/Addis_Ababa +5 -4
- data/data/Africa/Algiers +2 -2
- data/data/Africa/Asmara +5 -4
- data/data/Africa/Asmera +5 -4
- data/data/Africa/Bangui +4 -1
- data/data/Africa/Brazzaville +4 -1
- data/data/Africa/Casablanca +11 -11
- data/data/Africa/Dar_es_Salaam +5 -4
- data/data/Africa/Djibouti +5 -4
- data/data/Africa/Douala +4 -1
- data/data/Africa/El_Aaiun +11 -11
- data/data/Africa/Kampala +5 -4
- data/data/Africa/Kinshasa +4 -1
- data/data/Africa/Lagos +4 -1
- data/data/Africa/Libreville +4 -1
- data/data/Africa/Luanda +4 -1
- data/data/Africa/Malabo +4 -1
- data/data/Africa/Mogadishu +5 -4
- data/data/Africa/Nairobi +5 -4
- data/data/Africa/Niamey +4 -1
- data/data/Africa/Porto-Novo +4 -1
- data/data/America/Belize +44 -1
- data/data/America/Dawson +2 -38
- data/data/America/Grand_Turk +1 -2
- data/data/America/Nassau +6 -1
- data/data/America/Nuuk +120 -0
- data/data/America/Whitehorse +2 -38
- data/data/Antarctica/Casey +6 -1
- data/data/Antarctica/Macquarie +58 -3
- data/data/Asia/Chongqing +3 -1
- data/data/Asia/Chungking +3 -1
- data/data/Asia/Gaza +58 -56
- data/data/Asia/Harbin +3 -1
- data/data/Asia/Hebron +58 -56
- data/data/Asia/Jerusalem +34 -32
- data/data/Asia/Shanghai +3 -1
- data/data/Asia/Tel_Aviv +34 -32
- data/data/Atlantic/Bermuda +29 -2
- data/data/Australia/ACT +9 -9
- data/data/Australia/Adelaide +9 -9
- data/data/Australia/Brisbane +9 -9
- data/data/Australia/Broken_Hill +9 -9
- data/data/Australia/Canberra +9 -9
- data/data/Australia/Currie +22 -10
- data/data/Australia/Darwin +8 -8
- data/data/Australia/Eucla +7 -7
- data/data/Australia/Hobart +12 -8
- data/data/Australia/Lindeman +9 -9
- data/data/Australia/Melbourne +9 -9
- data/data/Australia/NSW +9 -9
- data/data/Australia/North +8 -8
- data/data/Australia/Perth +7 -7
- data/data/Australia/Queensland +9 -9
- data/data/Australia/South +9 -9
- data/data/Australia/Sydney +9 -9
- data/data/Australia/Tasmania +12 -8
- data/data/Australia/Victoria +9 -9
- data/data/Australia/West +7 -7
- data/data/Australia/Yancowinna +9 -9
- data/data/Canada/Yukon +2 -38
- data/data/Europe/Budapest +24 -24
- data/data/Europe/Monaco +3 -3
- data/data/Europe/Paris +3 -3
- data/data/Europe/Volgograd +2 -1
- data/data/Indian/Antananarivo +5 -4
- data/data/Indian/Comoro +5 -4
- data/data/Indian/Mahe +1 -1
- data/data/Indian/Mayotte +5 -4
- data/data/Israel +34 -32
- data/data/PRC +3 -1
- data/data/Pacific/Efate +5 -3
- data/data/Pacific/Fiji +2 -2
- data/lib/timezone/parser.rb +28 -14
- data/lib/timezone/version.rb +1 -1
- data/test/timezone/test_zone.rb +4 -4
- data/timezone.gemspec +0 -2
- metadata +8 -8
- data/data/US/Pacific-New +0 -189
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b3d58fa076590b65bbed8e8e815a9e69d937cfc0084e5d326c04ecefdec9840
|
4
|
+
data.tar.gz: 1abc8e54dd2bd3e4e102d15dae0e148afa048cc16aba3e451266163c41f4f561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 864742245bc0034ed2d5fe406af7aa34b6ecf834d3c8228a95d9e39d51b0670a603b9d3fec802d48ed63e43c9997d294544b3a59009995d292d6a9d42ea6c691
|
7
|
+
data.tar.gz: a04acff32993eda51495350dc8c61b2f3a5537d4fdc8672045508fdd786b936a29461472f69354fe5434687187af8a5c46e27774bc1ad91a756f7db114978354
|
data/.travis.yml
CHANGED
data/CHANGES.markdown
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# master (unreleased)
|
2
2
|
|
3
|
+
# 1.3.11
|
4
|
+
|
5
|
+
* Updated with `tzdata-2020f` ([@panthomakos][])
|
6
|
+
|
7
|
+
# 1.3.10
|
8
|
+
|
9
|
+
* Updated with `tzdata-2020d` ([@panthomakos][])
|
10
|
+
|
11
|
+
# 1.3.9
|
12
|
+
|
13
|
+
* Updated with `tzdata-2020c` ([@panthomakos][])
|
14
|
+
|
15
|
+
# 1.3.8
|
16
|
+
|
17
|
+
* Updated with `tzdata-2020b` ([@panthomakos][])
|
18
|
+
|
19
|
+
# 1.3.7
|
20
|
+
|
21
|
+
* Updated with `tzdata-2020a` ([@panthomakos][])
|
22
|
+
|
3
23
|
# 1.3.6
|
4
24
|
|
5
25
|
* Updated with `tzdata-2019c-1` ([@panthomakos][])
|
data/CONTRIBUTING.markdown
CHANGED
@@ -6,8 +6,14 @@
|
|
6
6
|
|
7
7
|
# How to Acquire New TZData Information
|
8
8
|
|
9
|
-
*
|
10
|
-
|
9
|
+
* Download and unzip the IANA timezone database (code and data) into the same directory. Use the timezone database README instructions to install. For example:
|
10
|
+
|
11
|
+
make TOPDIR=$HOME/Downloads/tz install
|
12
|
+
|
13
|
+
* Provide the root directory (TOPDIR) as the TZPATH environment variable. For example:
|
14
|
+
|
15
|
+
TZPATH=$HOME/Downloads/tz bundle exec rake parse
|
16
|
+
|
11
17
|
* Commit changes. For an example, see [this commit](https://github.com/panthomakos/timezone/commit/5815112d7a6c8740844189db0f05281e9c98f58f).
|
12
18
|
|
13
19
|
# Notes
|
data/Rakefile
CHANGED
@@ -19,7 +19,9 @@ task(:utc) { ENV['TZ'] = 'UTC' }
|
|
19
19
|
task default: %i[utc test rubocop]
|
20
20
|
|
21
21
|
task parse: :utc do
|
22
|
+
path = ENV['TZPATH'] || File.join(ENV['HOME'], 'Downloads', 'tz')
|
23
|
+
|
22
24
|
require 'timezone/parser'
|
23
25
|
|
24
|
-
Timezone::Parser.new.perform
|
26
|
+
Timezone::Parser.new(path).perform
|
25
27
|
end
|
data/benchmark.rb
CHANGED
@@ -4,42 +4,29 @@
|
|
4
4
|
require 'benchmark'
|
5
5
|
require 'timezone'
|
6
6
|
|
7
|
-
def load_tz(timezone)
|
8
|
-
Timezone.fetch(timezone)
|
9
|
-
end
|
10
|
-
|
11
7
|
puts 'Loading timezones'
|
12
8
|
|
13
|
-
LOAD_ITERATIONS = 1_000
|
14
9
|
Benchmark.bm do |x|
|
15
|
-
x.report('la') {
|
16
|
-
x.report('hk') {
|
17
|
-
end
|
18
|
-
|
19
|
-
def calc_local(timezone)
|
20
|
-
timezone.time(Time.utc(3000, 1, 1))
|
10
|
+
x.report('la') { 10_000.times { Timezone.fetch('America/Los_Angeles') } }
|
11
|
+
x.report('hk') { 10_000.times { Timezone.fetch('Asia/Hong_Kong') } }
|
21
12
|
end
|
22
13
|
|
23
|
-
|
24
|
-
|
25
|
-
LOCAL_ITERATIONS = 10_000
|
26
|
-
Benchmark.bm do |x|
|
27
|
-
timezone = Timezone.fetch('America/Los_Angeles')
|
28
|
-
x.report('la') { LOCAL_ITERATIONS.times { calc_local(timezone) } }
|
29
|
-
timezone = Timezone.fetch('Asia/Hong_Kong')
|
30
|
-
x.report('hk') { LOCAL_ITERATIONS.times { calc_local(timezone) } }
|
14
|
+
def calc(method, timezone, time)
|
15
|
+
timezone.public_send(method, time)
|
31
16
|
end
|
32
17
|
|
33
|
-
def
|
34
|
-
|
18
|
+
def bench(iterations, method)
|
19
|
+
Benchmark.bm do |x|
|
20
|
+
time = Time.utc(3000, 1, 1)
|
21
|
+
timezone = Timezone.fetch('America/Los_Angeles')
|
22
|
+
x.report('la') { iterations.times { calc(method, timezone, time) } }
|
23
|
+
timezone = Timezone.fetch('Asia/Hong_Kong')
|
24
|
+
x.report('hk') { iterations.times { calc(method, timezone, time) } }
|
25
|
+
end
|
35
26
|
end
|
36
27
|
|
37
|
-
puts 'Calculating
|
28
|
+
puts 'Calculating LOCAL (#time)'
|
29
|
+
bench(10_000, :time)
|
38
30
|
|
39
|
-
|
40
|
-
|
41
|
-
timezone = Timezone.fetch('America/Los_Angeles')
|
42
|
-
x.report('la') { UTC_ITERATIONS.times { calc_utc(timezone) } }
|
43
|
-
timezone = Timezone.fetch('Asia/Hong_Kong')
|
44
|
-
x.report('hk') { UTC_ITERATIONS.times { calc_utc(timezone) } }
|
45
|
-
end
|
31
|
+
puts 'Calculating UTC (#local_to_utc)'
|
32
|
+
bench(10_000, :local_to_utc)
|
data/data/Africa/Accra
CHANGED
@@ -1,48 +1,62 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
4
|
-
21082800:GMT:0:0
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
21082800:GMT:0:0
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
21082800:GMT:0:0
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
21082800:GMT:0:0
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
21082800:GMT:0:0
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
1
|
+
-1709337549:LMT:0:-52
|
2
|
+
128131148:GMT:0:0
|
3
|
+
3289200:+0020:1:1200
|
4
|
+
21082800:GMT:0:0
|
5
|
+
10539600:+0020:1:1200
|
6
|
+
20996400:GMT:0:0
|
7
|
+
10539600:+0020:1:1200
|
8
|
+
20996400:GMT:0:0
|
9
|
+
10539600:+0020:1:1200
|
10
|
+
20996400:GMT:0:0
|
11
|
+
10539600:+0020:1:1200
|
12
|
+
21082800:GMT:0:0
|
13
|
+
10539600:+0020:1:1200
|
14
|
+
20996400:GMT:0:0
|
15
|
+
10539600:+0020:1:1200
|
16
|
+
20996400:GMT:0:0
|
17
|
+
10539600:+0020:1:1200
|
18
|
+
20996400:GMT:0:0
|
19
|
+
10539600:+0020:1:1200
|
20
|
+
21082800:GMT:0:0
|
21
|
+
10539600:+0020:1:1200
|
22
|
+
20996400:GMT:0:0
|
23
|
+
10539600:+0020:1:1200
|
24
|
+
20996400:GMT:0:0
|
25
|
+
10539600:+0020:1:1200
|
26
|
+
20996400:GMT:0:0
|
27
|
+
10539600:+0020:1:1200
|
28
|
+
21082800:GMT:0:0
|
29
|
+
10539600:+0020:1:1200
|
30
|
+
20996400:GMT:0:0
|
31
|
+
10539600:+0020:1:1200
|
32
|
+
20996400:GMT:0:0
|
33
|
+
10539600:+0020:1:1200
|
34
|
+
20996400:GMT:0:0
|
35
|
+
10539600:+0020:1:1200
|
36
|
+
21082800:GMT:0:0
|
37
|
+
10539600:+0020:1:1200
|
38
|
+
20996400:GMT:0:0
|
39
|
+
10539600:+0020:1:1200
|
40
|
+
20996400:GMT:0:0
|
41
|
+
10539600:+0020:1:1200
|
42
|
+
20996400:GMT:0:0
|
43
|
+
10539600:+0020:1:1200
|
44
|
+
10455600:GMT:0:0
|
45
|
+
21166800:+0020:1:1200
|
46
|
+
10369200:GMT:0:0
|
47
|
+
21166800:+0020:1:1200
|
48
|
+
3277200:GMT:0:0
|
49
|
+
123377400:+0030:0:1800
|
50
|
+
146802600:GMT:0:0
|
51
|
+
10539000:+0030:1:1800
|
52
|
+
20997000:GMT:0:0
|
53
|
+
10539000:+0030:1:1800
|
54
|
+
21083400:GMT:0:0
|
55
|
+
10539000:+0030:1:1800
|
56
|
+
20997000:GMT:0:0
|
57
|
+
10539000:+0030:1:1800
|
58
|
+
20997000:GMT:0:0
|
59
|
+
10539000:+0030:1:1800
|
60
|
+
20997000:GMT:0:0
|
61
|
+
10539000:+0030:1:1800
|
48
62
|
1:GMT:0:0
|
data/data/Africa/Addis_Ababa
CHANGED
data/data/Africa/Algiers
CHANGED
data/data/Africa/Asmara
CHANGED
data/data/Africa/Asmera
CHANGED
data/data/Africa/Bangui
CHANGED
data/data/Africa/Brazzaville
CHANGED
data/data/Africa/Casablanca
CHANGED
@@ -56,14 +56,14 @@
|
|
56
56
|
16329600:+01:0:3600
|
57
57
|
3024000:+00:1:0
|
58
58
|
27216000:+01:0:3600
|
59
|
-
|
60
|
-
|
59
|
+
3628800:+00:1:0
|
60
|
+
27216000:+01:0:3600
|
61
61
|
3024000:+00:1:0
|
62
62
|
27216000:+01:0:3600
|
63
63
|
3628800:+00:1:0
|
64
64
|
27216000:+01:0:3600
|
65
|
-
|
66
|
-
|
65
|
+
3628800:+00:1:0
|
66
|
+
27216000:+01:0:3600
|
67
67
|
3024000:+00:1:0
|
68
68
|
27216000:+01:0:3600
|
69
69
|
3628800:+00:1:0
|
@@ -72,14 +72,14 @@
|
|
72
72
|
27820800:+01:0:3600
|
73
73
|
3024000:+00:1:0
|
74
74
|
27216000:+01:0:3600
|
75
|
-
|
76
|
-
|
75
|
+
3628800:+00:1:0
|
76
|
+
27216000:+01:0:3600
|
77
77
|
3024000:+00:1:0
|
78
78
|
27216000:+01:0:3600
|
79
79
|
3628800:+00:1:0
|
80
80
|
27216000:+01:0:3600
|
81
|
-
|
82
|
-
|
81
|
+
3628800:+00:1:0
|
82
|
+
27216000:+01:0:3600
|
83
83
|
3024000:+00:1:0
|
84
84
|
27216000:+01:0:3600
|
85
85
|
3628800:+00:1:0
|
@@ -88,11 +88,11 @@
|
|
88
88
|
27216000:+01:0:3600
|
89
89
|
3628800:+00:1:0
|
90
90
|
27216000:+01:0:3600
|
91
|
-
|
92
|
-
|
91
|
+
3628800:+00:1:0
|
92
|
+
27216000:+01:0:3600
|
93
93
|
3024000:+00:1:0
|
94
94
|
27216000:+01:0:3600
|
95
95
|
3628800:+00:1:0
|
96
96
|
27216000:+01:0:3600
|
97
|
-
|
97
|
+
3628800:+00:1:0
|
98
98
|
1:+01:0:3600
|
data/data/Africa/Dar_es_Salaam
CHANGED
data/data/Africa/Djibouti
CHANGED
data/data/Africa/Douala
CHANGED
data/data/Africa/El_Aaiun
CHANGED
@@ -45,14 +45,14 @@
|
|
45
45
|
16329600:+01:0:3600
|
46
46
|
3024000:+00:1:0
|
47
47
|
27216000:+01:0:3600
|
48
|
-
|
49
|
-
|
48
|
+
3628800:+00:1:0
|
49
|
+
27216000:+01:0:3600
|
50
50
|
3024000:+00:1:0
|
51
51
|
27216000:+01:0:3600
|
52
52
|
3628800:+00:1:0
|
53
53
|
27216000:+01:0:3600
|
54
|
-
|
55
|
-
|
54
|
+
3628800:+00:1:0
|
55
|
+
27216000:+01:0:3600
|
56
56
|
3024000:+00:1:0
|
57
57
|
27216000:+01:0:3600
|
58
58
|
3628800:+00:1:0
|
@@ -61,14 +61,14 @@
|
|
61
61
|
27820800:+01:0:3600
|
62
62
|
3024000:+00:1:0
|
63
63
|
27216000:+01:0:3600
|
64
|
-
|
65
|
-
|
64
|
+
3628800:+00:1:0
|
65
|
+
27216000:+01:0:3600
|
66
66
|
3024000:+00:1:0
|
67
67
|
27216000:+01:0:3600
|
68
68
|
3628800:+00:1:0
|
69
69
|
27216000:+01:0:3600
|
70
|
-
|
71
|
-
|
70
|
+
3628800:+00:1:0
|
71
|
+
27216000:+01:0:3600
|
72
72
|
3024000:+00:1:0
|
73
73
|
27216000:+01:0:3600
|
74
74
|
3628800:+00:1:0
|
@@ -77,11 +77,11 @@
|
|
77
77
|
27216000:+01:0:3600
|
78
78
|
3628800:+00:1:0
|
79
79
|
27216000:+01:0:3600
|
80
|
-
|
81
|
-
|
80
|
+
3628800:+00:1:0
|
81
|
+
27216000:+01:0:3600
|
82
82
|
3024000:+00:1:0
|
83
83
|
27216000:+01:0:3600
|
84
84
|
3628800:+00:1:0
|
85
85
|
27216000:+01:0:3600
|
86
|
-
|
86
|
+
3628800:+00:1:0
|
87
87
|
1:+01:0:3600
|
data/data/Africa/Kampala
CHANGED