football-timezones 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/Manifest.txt +2 -0
- data/config/timezones_africa.csv +14 -1
- data/config/timezones_america.csv +16 -15
- data/config/timezones_asia.csv +2 -2
- data/config/timezones_europe.csv +50 -10
- data/config/timezones_middle_east.csv +5 -0
- data/config/timezones_pacific.csv +5 -0
- data/config/timezones_world.csv +10 -1
- data/lib/football-timezones/version.rb +2 -2
- data/lib/football-timezones.rb +11 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e08f96e81b26f14812a27466a51ac335efe52c84f2178d6401e602e27dae2d85
|
4
|
+
data.tar.gz: 4d16d94cde0365e2ae50ecb0b365c5070330317ee21af883a941b1cc73c2878c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44e465c38195500850d1ec8fdae58a896f7c238d4fe146d7f263bc2ede1b58fb3b25f497d86173665e5545ea1ddeb021c954571b1b030d9c06dcca695266539
|
7
|
+
data.tar.gz: d280c9f264fdb0f5dadb5b49d0cd92f925887975be4fffe24582eb00387509db240193e5adcd335ef12682b2d14026611524ac5a981b40a8617161c33d186eb1
|
data/CHANGELOG.md
CHANGED
data/Manifest.txt
CHANGED
@@ -6,6 +6,8 @@ config/timezones_africa.csv
|
|
6
6
|
config/timezones_america.csv
|
7
7
|
config/timezones_asia.csv
|
8
8
|
config/timezones_europe.csv
|
9
|
+
config/timezones_middle_east.csv
|
10
|
+
config/timezones_pacific.csv
|
9
11
|
config/timezones_world.csv
|
10
12
|
lib/football-timezones.rb
|
11
13
|
lib/football-timezones/version.rb
|
data/config/timezones_africa.csv
CHANGED
@@ -1,29 +1,30 @@
|
|
1
1
|
key, zone
|
2
2
|
|
3
3
|
|
4
|
-
us, America/New_York
|
4
|
+
us, America/New_York
|
5
5
|
ca, America/Toronto
|
6
6
|
|
7
7
|
mx, America/Mexico_City
|
8
8
|
|
9
9
|
|
10
|
-
cr, America/Costa_Rica
|
11
|
-
gt, America/Guatemala
|
12
|
-
hn, America/Tegucigalpa
|
13
|
-
sv, America/El_Salvador
|
14
|
-
ni, America/Managua
|
10
|
+
cr, America/Costa_Rica
|
11
|
+
gt, America/Guatemala
|
12
|
+
hn, America/Tegucigalpa
|
13
|
+
sv, America/El_Salvador
|
14
|
+
ni, America/Managua
|
15
15
|
|
16
|
-
uy, America/Montevideo
|
17
|
-
pe, America/Lima
|
18
|
-
ec, America/Guayaquil
|
16
|
+
uy, America/Montevideo
|
17
|
+
pe, America/Lima
|
18
|
+
ec, America/Guayaquil
|
19
19
|
co, America/Bogota
|
20
|
-
bo, America/La_Paz
|
21
|
-
cl, America/Santiago
|
20
|
+
bo, America/La_Paz
|
21
|
+
cl, America/Santiago
|
22
|
+
py, America/Asuncion
|
22
23
|
|
23
|
-
br, America/Sao_Paulo
|
24
|
-
ar, America/Argentina/Buenos_Aires
|
24
|
+
br, America/Sao_Paulo
|
25
|
+
ar, America/Argentina/Buenos_Aires
|
25
26
|
|
26
27
|
|
27
|
-
concacaf.cl, America/Mexico_City ### use mx time
|
28
|
-
copa.l, America/Sao_Paulo ### use brazil time
|
28
|
+
concacaf.cl, America/Mexico_City ### use mx time - why? why not?
|
29
|
+
copa.l, America/Sao_Paulo ### use brazil time - why? why not?
|
29
30
|
|
data/config/timezones_asia.csv
CHANGED
data/config/timezones_europe.csv
CHANGED
@@ -9,39 +9,79 @@ de, Europe/Berlin
|
|
9
9
|
fr, Europe/Paris
|
10
10
|
it, Europe/Rome
|
11
11
|
|
12
|
-
|
12
|
+
sm, Europe/San_Marino
|
13
|
+
va, Europe/Vatican
|
13
14
|
|
14
15
|
|
16
|
+
pt, Europe/Lisbon
|
17
|
+
ad, Europe/Andorra
|
18
|
+
gi, Europe/Gibraltar
|
19
|
+
mc, Europe/Monaco
|
15
20
|
|
16
21
|
|
17
|
-
|
22
|
+
cy, Asia/Nicosia
|
23
|
+
mt, Europe/Malta
|
18
24
|
gr, Europe/Athens
|
25
|
+
tr, Europe/Istanbul
|
19
26
|
ro, Europe/Bucharest
|
27
|
+
bg, Europe/Sofia
|
20
28
|
ua, Europe/Kyiv
|
29
|
+
ru, Europe/Moscow
|
30
|
+
by, Europe/Minsk
|
31
|
+
|
21
32
|
|
22
33
|
|
23
|
-
ru, Europe/Moscow
|
24
|
-
tr, Europe/Istanbul # +3 turkey time/moscow time
|
25
34
|
|
26
35
|
at, Europe/Vienna
|
27
36
|
ch, Europe/Zurich
|
37
|
+
li, Europe/Vaduz
|
38
|
+
|
28
39
|
hu, Europe/Budapest
|
29
40
|
cz, Europe/Prague
|
30
41
|
sk, Europe/Bratislava # link to Prague !!!
|
42
|
+
si, Europe/Ljubljana
|
43
|
+
mk, Europe/Skopje
|
44
|
+
|
45
|
+
|
31
46
|
pl, Europe/Warsaw
|
47
|
+
|
32
48
|
be, Europe/Brussels
|
33
49
|
lu, Europe/Luxembourg # link to Brussels !!!
|
34
50
|
nl, Europe/Amsterdam # link to Brussels !!!
|
35
51
|
|
36
52
|
|
37
|
-
|
38
|
-
|
39
|
-
|
53
|
+
|
54
|
+
is, Iceland
|
55
|
+
|
56
|
+
|
57
|
+
dk, Europe/Copenhagen ## link to Berlin
|
58
|
+
se, Europe/Stockholm ## link to Berlin
|
59
|
+
no, Europe/Oslo # link to Berlin
|
60
|
+
fi, Europe/Helsinki
|
61
|
+
|
62
|
+
lv, Europe/Riga
|
63
|
+
ee, Europe/Tallinn
|
64
|
+
lt, Europe/Vilnius
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
hr, Europe/Zagreb # link to Belgrade
|
69
|
+
al, Europe/Tirane
|
70
|
+
ba, Europe/Sarajevo # link to Belgrade
|
71
|
+
me, Europe/Podgorica
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
md, Europe/Chisinau
|
76
|
+
|
77
|
+
|
40
78
|
|
41
79
|
|
42
80
|
|
43
81
|
## for champs default for not to cet (central european time) - why? why not?
|
44
|
-
uefa.cl,
|
45
|
-
uefa.el,
|
46
|
-
|
82
|
+
uefa.cl, Europe/Paris
|
83
|
+
uefa.el, Europe/Paris
|
84
|
+
uefa.conf, Europe/Paris
|
85
|
+
uefa.nl, Europe/Paris
|
86
|
+
euro, Europe/Paris
|
47
87
|
|
data/config/timezones_world.csv
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
key, zone
|
2
2
|
|
3
3
|
|
4
|
-
|
4
|
+
world+2022, Asia/Qatar # Qatar
|
5
|
+
world+2018, Europe/Moscow # Russia
|
6
|
+
world+2014, America/Sao_Paulo # Brazil
|
7
|
+
world+2010, Africa/Johannesburg # South Africa
|
8
|
+
world+2006, Europe/Berlin # Germany
|
9
|
+
world+2002, Asia/Tokyo # Japan & South Korea
|
10
|
+
world+1998, Europe/Paris # France
|
11
|
+
|
12
|
+
|
13
|
+
|
data/lib/football-timezones.rb
CHANGED
@@ -84,13 +84,16 @@ class Timezone ## nested inside UTC
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def local_time( year, month=1, mday=1, hour=0, min=0, sec=0 )
|
87
|
-
|
87
|
+
## add auto-fix for ambigious time (dst vs non-dst)
|
88
|
+
## always select first for now (that is, dst)
|
89
|
+
@zone.local_time( year, month, mday, hour, min, sec ) {|time| time.first }
|
88
90
|
end
|
89
91
|
|
90
92
|
def now() @zone.now; end
|
91
93
|
|
92
94
|
|
93
95
|
|
96
|
+
|
94
97
|
def assert( cond, msg )
|
95
98
|
if cond
|
96
99
|
# do nothing
|
@@ -107,11 +110,17 @@ end # module UTC
|
|
107
110
|
|
108
111
|
module TimezoneHelper
|
109
112
|
def find_zone!( league:, season: )
|
113
|
+
## note: do NOT pass in league struct! pass in key (string)
|
114
|
+
raise ArgumentError, "league key as string|symbol expected" unless league.is_a?(String) || league.is_a?(Symbol)
|
115
|
+
|
110
116
|
@zones ||= begin
|
111
117
|
zones = {}
|
112
|
-
['
|
118
|
+
['timezones_africa',
|
119
|
+
'timezones_america',
|
113
120
|
'timezones_asia',
|
114
121
|
'timezones_europe',
|
122
|
+
'timezones_middle_east',
|
123
|
+
'timezones_pacific',
|
115
124
|
'timezones_world',].each do |name|
|
116
125
|
recs = read_csv( "#{SportDb::Module::Timezones.root}/config/#{name}.csv" )
|
117
126
|
recs.each do |rec|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: football-timezones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -103,6 +103,8 @@ files:
|
|
103
103
|
- config/timezones_america.csv
|
104
104
|
- config/timezones_asia.csv
|
105
105
|
- config/timezones_europe.csv
|
106
|
+
- config/timezones_middle_east.csv
|
107
|
+
- config/timezones_pacific.csv
|
106
108
|
- config/timezones_world.csv
|
107
109
|
- lib/football-timezones.rb
|
108
110
|
- lib/football-timezones/version.rb
|