tzinfo 1.2.1 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data/.yardopts +3 -0
  4. data/CHANGES.md +693 -315
  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 +148 -120
  9. data/lib/tzinfo/country_timezone.rb +71 -101
  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 +997 -473
  46. data/lib/tzinfo/timezone_offset.rb +91 -54
  47. data/lib/tzinfo/timezone_period.rb +163 -188
  48. data/lib/tzinfo/timezone_proxy.rb +75 -49
  49. data/lib/tzinfo/timezone_transition.rb +77 -99
  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 -120
  58. metadata.gz.sig +0 -0
  59. data/Rakefile +0 -104
  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 -70
  67. data/lib/tzinfo/ruby_data_source.rb +0 -136
  68. data/lib/tzinfo/time_or_datetime.rb +0 -333
  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 -101
  73. data/lib/tzinfo/transition_data_timezone_info.rb +0 -274
  74. data/lib/tzinfo/zoneinfo_country_info.rb +0 -35
  75. data/lib/tzinfo/zoneinfo_data_source.rb +0 -460
  76. data/lib/tzinfo/zoneinfo_timezone_info.rb +0 -245
  77. data/test/tc_country.rb +0 -236
  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 -161
  81. data/test/tc_data_source.rb +0 -192
  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 -80
  90. data/test/tc_ruby_data_source.rb +0 -143
  91. data/test/tc_time_or_datetime.rb +0 -639
  92. data/test/tc_timezone.rb +0 -1334
  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 -548
  101. data/test/tc_timezone_proxy.rb +0 -113
  102. data/test/tc_timezone_transition.rb +0 -352
  103. data/test/tc_timezone_transition_definition.rb +0 -284
  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 -64
  107. data/test/tc_zoneinfo_data_source.rb +0 -985
  108. data/test/tc_zoneinfo_timezone_info.rb +0 -814
  109. data/test/test_utils.rb +0 -132
  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 -594
  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/posix/Europe/London +0 -0
  143. data/test/zoneinfo/posixrules +0 -0
  144. data/test/zoneinfo/right/Europe/London +0 -0
  145. data/test/zoneinfo/zone.tab +0 -452
  146. 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 (2013-05-27):
7
- #
8
- # This file contains a table with the following columns:
9
- # 1. ISO 3166-1 alpha-2 country code, current as of
10
- # ISO 3166-1 Newsletter VI-15 (2013-05-10). See: Updates on ISO 3166
11
- # http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
12
- # 2. The usual English name for the coded region,
13
- # chosen so that alphabetic sorting of subsets produces helpful lists.
14
- # This is not the same as the English name in the ISO 3166 tables.
15
- #
16
- # Columns are separated by a single tab.
17
- # The table is sorted by country code.
18
- #
19
- # Lines beginning with `#' are comments.
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
Binary file
Binary file
Binary file