tzinfo 1.2.5 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.yardopts +3 -0
  4. data/CHANGES.md +607 -377
  5. data/LICENSE +13 -13
  6. data/README.md +368 -113
  7. data/lib/tzinfo/annual_rules.rb +71 -0
  8. data/lib/tzinfo/country.rb +141 -129
  9. data/lib/tzinfo/country_timezone.rb +70 -112
  10. data/lib/tzinfo/data_source.rb +400 -144
  11. data/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb +56 -0
  12. data/lib/tzinfo/data_sources/country_info.rb +42 -0
  13. data/lib/tzinfo/data_sources/data_timezone_info.rb +91 -0
  14. data/lib/tzinfo/data_sources/linked_timezone_info.rb +33 -0
  15. data/lib/tzinfo/data_sources/posix_time_zone_parser.rb +181 -0
  16. data/lib/tzinfo/data_sources/ruby_data_source.rb +145 -0
  17. data/lib/tzinfo/data_sources/timezone_info.rb +47 -0
  18. data/lib/tzinfo/data_sources/transitions_data_timezone_info.rb +214 -0
  19. data/lib/tzinfo/data_sources/zoneinfo_data_source.rb +596 -0
  20. data/lib/tzinfo/data_sources/zoneinfo_reader.rb +486 -0
  21. data/lib/tzinfo/data_sources.rb +8 -0
  22. data/lib/tzinfo/data_timezone.rb +33 -47
  23. data/lib/tzinfo/datetime_with_offset.rb +153 -0
  24. data/lib/tzinfo/format1/country_definer.rb +17 -0
  25. data/lib/tzinfo/format1/country_index_definition.rb +64 -0
  26. data/lib/tzinfo/format1/timezone_definer.rb +64 -0
  27. data/lib/tzinfo/format1/timezone_definition.rb +39 -0
  28. data/lib/tzinfo/format1/timezone_index_definition.rb +77 -0
  29. data/lib/tzinfo/format1.rb +10 -0
  30. data/lib/tzinfo/format2/country_definer.rb +68 -0
  31. data/lib/tzinfo/format2/country_index_definer.rb +68 -0
  32. data/lib/tzinfo/format2/country_index_definition.rb +46 -0
  33. data/lib/tzinfo/format2/timezone_definer.rb +94 -0
  34. data/lib/tzinfo/format2/timezone_definition.rb +73 -0
  35. data/lib/tzinfo/format2/timezone_index_definer.rb +45 -0
  36. data/lib/tzinfo/format2/timezone_index_definition.rb +55 -0
  37. data/lib/tzinfo/format2.rb +10 -0
  38. data/lib/tzinfo/info_timezone.rb +26 -21
  39. data/lib/tzinfo/linked_timezone.rb +33 -52
  40. data/lib/tzinfo/offset_timezone_period.rb +42 -0
  41. data/lib/tzinfo/string_deduper.rb +118 -0
  42. data/lib/tzinfo/time_with_offset.rb +154 -0
  43. data/lib/tzinfo/timestamp.rb +552 -0
  44. data/lib/tzinfo/timestamp_with_offset.rb +85 -0
  45. data/lib/tzinfo/timezone.rb +989 -498
  46. data/lib/tzinfo/timezone_offset.rb +84 -74
  47. data/lib/tzinfo/timezone_period.rb +151 -217
  48. data/lib/tzinfo/timezone_proxy.rb +70 -79
  49. data/lib/tzinfo/timezone_transition.rb +77 -109
  50. data/lib/tzinfo/transition_rule.rb +455 -0
  51. data/lib/tzinfo/transitions_timezone_period.rb +63 -0
  52. data/lib/tzinfo/untaint_ext.rb +18 -0
  53. data/lib/tzinfo/version.rb +7 -0
  54. data/lib/tzinfo/with_offset.rb +61 -0
  55. data/lib/tzinfo.rb +74 -29
  56. data.tar.gz.sig +0 -0
  57. metadata +72 -122
  58. metadata.gz.sig +0 -0
  59. data/Rakefile +0 -107
  60. data/lib/tzinfo/country_index_definition.rb +0 -31
  61. data/lib/tzinfo/country_info.rb +0 -42
  62. data/lib/tzinfo/data_timezone_info.rb +0 -55
  63. data/lib/tzinfo/linked_timezone_info.rb +0 -26
  64. data/lib/tzinfo/offset_rationals.rb +0 -77
  65. data/lib/tzinfo/ruby_core_support.rb +0 -146
  66. data/lib/tzinfo/ruby_country_info.rb +0 -74
  67. data/lib/tzinfo/ruby_data_source.rb +0 -136
  68. data/lib/tzinfo/time_or_datetime.rb +0 -340
  69. data/lib/tzinfo/timezone_definition.rb +0 -36
  70. data/lib/tzinfo/timezone_index_definition.rb +0 -54
  71. data/lib/tzinfo/timezone_info.rb +0 -30
  72. data/lib/tzinfo/timezone_transition_definition.rb +0 -104
  73. data/lib/tzinfo/transition_data_timezone_info.rb +0 -274
  74. data/lib/tzinfo/zoneinfo_country_info.rb +0 -37
  75. data/lib/tzinfo/zoneinfo_data_source.rb +0 -488
  76. data/lib/tzinfo/zoneinfo_timezone_info.rb +0 -296
  77. data/test/tc_country.rb +0 -234
  78. data/test/tc_country_index_definition.rb +0 -69
  79. data/test/tc_country_info.rb +0 -16
  80. data/test/tc_country_timezone.rb +0 -173
  81. data/test/tc_data_source.rb +0 -218
  82. data/test/tc_data_timezone.rb +0 -99
  83. data/test/tc_data_timezone_info.rb +0 -18
  84. data/test/tc_info_timezone.rb +0 -34
  85. data/test/tc_linked_timezone.rb +0 -155
  86. data/test/tc_linked_timezone_info.rb +0 -23
  87. data/test/tc_offset_rationals.rb +0 -23
  88. data/test/tc_ruby_core_support.rb +0 -168
  89. data/test/tc_ruby_country_info.rb +0 -110
  90. data/test/tc_ruby_data_source.rb +0 -143
  91. data/test/tc_time_or_datetime.rb +0 -654
  92. data/test/tc_timezone.rb +0 -1350
  93. data/test/tc_timezone_definition.rb +0 -113
  94. data/test/tc_timezone_index_definition.rb +0 -73
  95. data/test/tc_timezone_info.rb +0 -11
  96. data/test/tc_timezone_london.rb +0 -143
  97. data/test/tc_timezone_melbourne.rb +0 -142
  98. data/test/tc_timezone_new_york.rb +0 -142
  99. data/test/tc_timezone_offset.rb +0 -126
  100. data/test/tc_timezone_period.rb +0 -555
  101. data/test/tc_timezone_proxy.rb +0 -136
  102. data/test/tc_timezone_transition.rb +0 -366
  103. data/test/tc_timezone_transition_definition.rb +0 -295
  104. data/test/tc_timezone_utc.rb +0 -27
  105. data/test/tc_transition_data_timezone_info.rb +0 -423
  106. data/test/tc_zoneinfo_country_info.rb +0 -78
  107. data/test/tc_zoneinfo_data_source.rb +0 -1195
  108. data/test/tc_zoneinfo_timezone_info.rb +0 -1232
  109. data/test/test_utils.rb +0 -163
  110. data/test/ts_all.rb +0 -7
  111. data/test/ts_all_ruby.rb +0 -5
  112. data/test/ts_all_zoneinfo.rb +0 -7
  113. data/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb +0 -89
  114. data/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb +0 -315
  115. data/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb +0 -218
  116. data/test/tzinfo-data/tzinfo/data/definitions/EST.rb +0 -19
  117. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb +0 -21
  118. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb +0 -21
  119. data/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb +0 -21
  120. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb +0 -261
  121. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb +0 -186
  122. data/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb +0 -321
  123. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb +0 -265
  124. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb +0 -220
  125. data/test/tzinfo-data/tzinfo/data/definitions/UTC.rb +0 -16
  126. data/test/tzinfo-data/tzinfo/data/indexes/countries.rb +0 -927
  127. data/test/tzinfo-data/tzinfo/data/indexes/timezones.rb +0 -596
  128. data/test/tzinfo-data/tzinfo/data/version.rb +0 -14
  129. data/test/tzinfo-data/tzinfo/data.rb +0 -8
  130. data/test/zoneinfo/America/Argentina/Buenos_Aires +0 -0
  131. data/test/zoneinfo/America/New_York +0 -0
  132. data/test/zoneinfo/Australia/Melbourne +0 -0
  133. data/test/zoneinfo/EST +0 -0
  134. data/test/zoneinfo/Etc/UTC +0 -0
  135. data/test/zoneinfo/Europe/Amsterdam +0 -0
  136. data/test/zoneinfo/Europe/Andorra +0 -0
  137. data/test/zoneinfo/Europe/London +0 -0
  138. data/test/zoneinfo/Europe/Paris +0 -0
  139. data/test/zoneinfo/Europe/Prague +0 -0
  140. data/test/zoneinfo/Factory +0 -0
  141. data/test/zoneinfo/iso3166.tab +0 -275
  142. data/test/zoneinfo/leapseconds +0 -61
  143. data/test/zoneinfo/posix/Europe/London +0 -0
  144. data/test/zoneinfo/posixrules +0 -0
  145. data/test/zoneinfo/right/Europe/London +0 -0
  146. data/test/zoneinfo/zone.tab +0 -439
  147. data/test/zoneinfo/zone1970.tab +0 -369
  148. data/tzinfo.gemspec +0 -21
@@ -1,275 +0,0 @@
1
- # ISO 3166 alpha-2 country codes
2
- #
3
- # This file is in the public domain, so clarified as of
4
- # 2009-05-17 by Arthur David Olson.
5
- #
6
- # From Paul Eggert (2014-07-18):
7
- # This file contains a table of two-letter country codes. Columns are
8
- # separated by a single tab. Lines beginning with '#' are comments.
9
- # Although all text currently uses ASCII encoding, this is planned to
10
- # change to UTF-8 soon. The columns of the table are as follows:
11
- #
12
- # 1. ISO 3166-1 alpha-2 country code, current as of
13
- # ISO 3166-1 Newsletter VI-16 (2013-07-11). See: Updates on ISO 3166
14
- # http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
15
- # 2. The usual English name for the coded region,
16
- # chosen so that alphabetic sorting of subsets produces helpful lists.
17
- # This is not the same as the English name in the ISO 3166 tables.
18
- #
19
- # The table is sorted by country code.
20
- #
21
- # This table is intended as an aid for users, to help them select time
22
- # zone data appropriate for their practical needs. It is not intended
23
- # to take or endorse any position on legal or territorial claims.
24
- #
25
- #country-
26
- #code name of country, territory, area, or subdivision
27
- AD Andorra
28
- AE United Arab Emirates
29
- AF Afghanistan
30
- AG Antigua & Barbuda
31
- AI Anguilla
32
- AL Albania
33
- AM Armenia
34
- AO Angola
35
- AQ Antarctica
36
- AR Argentina
37
- AS Samoa (American)
38
- AT Austria
39
- AU Australia
40
- AW Aruba
41
- AX Aaland Islands
42
- AZ Azerbaijan
43
- BA Bosnia & Herzegovina
44
- BB Barbados
45
- BD Bangladesh
46
- BE Belgium
47
- BF Burkina Faso
48
- BG Bulgaria
49
- BH Bahrain
50
- BI Burundi
51
- BJ Benin
52
- BL St Barthelemy
53
- BM Bermuda
54
- BN Brunei
55
- BO Bolivia
56
- BQ Caribbean Netherlands
57
- BR Brazil
58
- BS Bahamas
59
- BT Bhutan
60
- BV Bouvet Island
61
- BW Botswana
62
- BY Belarus
63
- BZ Belize
64
- CA Canada
65
- CC Cocos (Keeling) Islands
66
- CD Congo (Dem. Rep.)
67
- CF Central African Rep.
68
- CG Congo (Rep.)
69
- CH Switzerland
70
- CI Cote d'Ivoire
71
- CK Cook Islands
72
- CL Chile
73
- CM Cameroon
74
- CN China
75
- CO Colombia
76
- CR Costa Rica
77
- CU Cuba
78
- CV Cape Verde
79
- CW Curacao
80
- CX Christmas Island
81
- CY Cyprus
82
- CZ Czech Republic
83
- DE Germany
84
- DJ Djibouti
85
- DK Denmark
86
- DM Dominica
87
- DO Dominican Republic
88
- DZ Algeria
89
- EC Ecuador
90
- EE Estonia
91
- EG Egypt
92
- EH Western Sahara
93
- ER Eritrea
94
- ES Spain
95
- ET Ethiopia
96
- FI Finland
97
- FJ Fiji
98
- FK Falkland Islands
99
- FM Micronesia
100
- FO Faroe Islands
101
- FR France
102
- GA Gabon
103
- GB Britain (UK)
104
- GD Grenada
105
- GE Georgia
106
- GF French Guiana
107
- GG Guernsey
108
- GH Ghana
109
- GI Gibraltar
110
- GL Greenland
111
- GM Gambia
112
- GN Guinea
113
- GP Guadeloupe
114
- GQ Equatorial Guinea
115
- GR Greece
116
- GS South Georgia & the South Sandwich Islands
117
- GT Guatemala
118
- GU Guam
119
- GW Guinea-Bissau
120
- GY Guyana
121
- HK Hong Kong
122
- HM Heard Island & McDonald Islands
123
- HN Honduras
124
- HR Croatia
125
- HT Haiti
126
- HU Hungary
127
- ID Indonesia
128
- IE Ireland
129
- IL Israel
130
- IM Isle of Man
131
- IN India
132
- IO British Indian Ocean Territory
133
- IQ Iraq
134
- IR Iran
135
- IS Iceland
136
- IT Italy
137
- JE Jersey
138
- JM Jamaica
139
- JO Jordan
140
- JP Japan
141
- KE Kenya
142
- KG Kyrgyzstan
143
- KH Cambodia
144
- KI Kiribati
145
- KM Comoros
146
- KN St Kitts & Nevis
147
- KP Korea (North)
148
- KR Korea (South)
149
- KW Kuwait
150
- KY Cayman Islands
151
- KZ Kazakhstan
152
- LA Laos
153
- LB Lebanon
154
- LC St Lucia
155
- LI Liechtenstein
156
- LK Sri Lanka
157
- LR Liberia
158
- LS Lesotho
159
- LT Lithuania
160
- LU Luxembourg
161
- LV Latvia
162
- LY Libya
163
- MA Morocco
164
- MC Monaco
165
- MD Moldova
166
- ME Montenegro
167
- MF St Martin (French part)
168
- MG Madagascar
169
- MH Marshall Islands
170
- MK Macedonia
171
- ML Mali
172
- MM Myanmar (Burma)
173
- MN Mongolia
174
- MO Macau
175
- MP Northern Mariana Islands
176
- MQ Martinique
177
- MR Mauritania
178
- MS Montserrat
179
- MT Malta
180
- MU Mauritius
181
- MV Maldives
182
- MW Malawi
183
- MX Mexico
184
- MY Malaysia
185
- MZ Mozambique
186
- NA Namibia
187
- NC New Caledonia
188
- NE Niger
189
- NF Norfolk Island
190
- NG Nigeria
191
- NI Nicaragua
192
- NL Netherlands
193
- NO Norway
194
- NP Nepal
195
- NR Nauru
196
- NU Niue
197
- NZ New Zealand
198
- OM Oman
199
- PA Panama
200
- PE Peru
201
- PF French Polynesia
202
- PG Papua New Guinea
203
- PH Philippines
204
- PK Pakistan
205
- PL Poland
206
- PM St Pierre & Miquelon
207
- PN Pitcairn
208
- PR Puerto Rico
209
- PS Palestine
210
- PT Portugal
211
- PW Palau
212
- PY Paraguay
213
- QA Qatar
214
- RE Reunion
215
- RO Romania
216
- RS Serbia
217
- RU Russia
218
- RW Rwanda
219
- SA Saudi Arabia
220
- SB Solomon Islands
221
- SC Seychelles
222
- SD Sudan
223
- SE Sweden
224
- SG Singapore
225
- SH St Helena
226
- SI Slovenia
227
- SJ Svalbard & Jan Mayen
228
- SK Slovakia
229
- SL Sierra Leone
230
- SM San Marino
231
- SN Senegal
232
- SO Somalia
233
- SR Suriname
234
- SS South Sudan
235
- ST Sao Tome & Principe
236
- SV El Salvador
237
- SX St Maarten (Dutch part)
238
- SY Syria
239
- SZ Swaziland
240
- TC Turks & Caicos Is
241
- TD Chad
242
- TF French Southern & Antarctic Lands
243
- TG Togo
244
- TH Thailand
245
- TJ Tajikistan
246
- TK Tokelau
247
- TL East Timor
248
- TM Turkmenistan
249
- TN Tunisia
250
- TO Tonga
251
- TR Turkey
252
- TT Trinidad & Tobago
253
- TV Tuvalu
254
- TW Taiwan
255
- TZ Tanzania
256
- UA Ukraine
257
- UG Uganda
258
- UM US minor outlying islands
259
- US United States
260
- UY Uruguay
261
- UZ Uzbekistan
262
- VA Vatican City
263
- VC St Vincent
264
- VE Venezuela
265
- VG Virgin Islands (UK)
266
- VI Virgin Islands (US)
267
- VN Vietnam
268
- VU Vanuatu
269
- WF Wallis & Futuna
270
- WS Samoa (western)
271
- YE Yemen
272
- YT Mayotte
273
- ZA South Africa
274
- ZM Zambia
275
- ZW Zimbabwe
@@ -1,61 +0,0 @@
1
- # Allowance for leap seconds added to each time zone file.
2
-
3
- # This file is in the public domain.
4
-
5
- # This file is generated automatically from the data in the public-domain
6
- # leap-seconds.list file, which is copied from:
7
- # ftp://ftp.nist.gov/pub/time/leap-seconds.list
8
- # For more about leap-seconds.list, please see
9
- # The NTP Timescale and Leap Seconds
10
- # https://www.eecis.udel.edu/~mills/leap.html
11
-
12
- # The International Earth Rotation and Reference Systems Service
13
- # periodically uses leap seconds to keep UTC to within 0.9 s of UT1
14
- # (which measures the true angular orientation of the earth in space); see
15
- # Levine J. Coordinated Universal Time and the leap second.
16
- # URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
17
- # http://ieeexplore.ieee.org/document/7909995/
18
- # There were no leap seconds before 1972, because the official mechanism
19
- # accounting for the discrepancy between atomic time and the earth's rotation
20
- # did not exist until the early 1970s.
21
-
22
- # The correction (+ or -) is made at the given time, so lines
23
- # will typically look like:
24
- # Leap YEAR MON DAY 23:59:60 + R/S
25
- # or
26
- # Leap YEAR MON DAY 23:59:59 - R/S
27
-
28
- # If the leapsecond is Rolling (R) the given time is local time.
29
- # If the leapsecond is Stationary (S) the given time is UTC.
30
-
31
- # Leap YEAR MONTH DAY HH:MM:SS CORR R/S
32
- Leap 1972 Jun 30 23:59:60 + S
33
- Leap 1972 Dec 31 23:59:60 + S
34
- Leap 1973 Dec 31 23:59:60 + S
35
- Leap 1974 Dec 31 23:59:60 + S
36
- Leap 1975 Dec 31 23:59:60 + S
37
- Leap 1976 Dec 31 23:59:60 + S
38
- Leap 1977 Dec 31 23:59:60 + S
39
- Leap 1978 Dec 31 23:59:60 + S
40
- Leap 1979 Dec 31 23:59:60 + S
41
- Leap 1981 Jun 30 23:59:60 + S
42
- Leap 1982 Jun 30 23:59:60 + S
43
- Leap 1983 Jun 30 23:59:60 + S
44
- Leap 1985 Jun 30 23:59:60 + S
45
- Leap 1987 Dec 31 23:59:60 + S
46
- Leap 1989 Dec 31 23:59:60 + S
47
- Leap 1990 Dec 31 23:59:60 + S
48
- Leap 1992 Jun 30 23:59:60 + S
49
- Leap 1993 Jun 30 23:59:60 + S
50
- Leap 1994 Jun 30 23:59:60 + S
51
- Leap 1995 Dec 31 23:59:60 + S
52
- Leap 1997 Jun 30 23:59:60 + S
53
- Leap 1998 Dec 31 23:59:60 + S
54
- Leap 2005 Dec 31 23:59:60 + S
55
- Leap 2008 Dec 31 23:59:60 + S
56
- Leap 2012 Jun 30 23:59:60 + S
57
- Leap 2015 Jun 30 23:59:60 + S
58
- Leap 2016 Dec 31 23:59:60 + S
59
-
60
- # Updated through IERS Bulletin C54
61
- # File expires on: 28 June 2018
Binary file
Binary file
Binary file