tzinfo 0.3.62 → 1.0.0
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.
- checksums.yaml +7 -0
- data/CHANGES +25 -158
- data/LICENSE +1 -1
- data/README +89 -55
- data/Rakefile +87 -282
- data/lib/tzinfo/country.rb +28 -34
- data/lib/tzinfo/country_index_definition.rb +2 -7
- data/lib/tzinfo/country_info.rb +20 -44
- data/lib/tzinfo/country_timezone.rb +1 -1
- data/lib/tzinfo/data_source.rb +182 -0
- data/lib/tzinfo/data_timezone.rb +1 -3
- data/lib/tzinfo/data_timezone_info.rb +11 -190
- data/lib/tzinfo/info_timezone.rb +1 -3
- data/lib/tzinfo/linked_timezone.rb +1 -4
- data/lib/tzinfo/linked_timezone_info.rb +9 -5
- data/lib/tzinfo/offset_rationals.rb +2 -4
- data/lib/tzinfo/ruby_core_support.rb +152 -82
- data/lib/tzinfo/ruby_country_info.rb +78 -0
- data/lib/tzinfo/ruby_data_source.rb +153 -0
- data/lib/tzinfo/time_or_datetime.rb +83 -52
- data/lib/tzinfo/timezone.rb +27 -69
- data/lib/tzinfo/timezone_definition.rb +4 -7
- data/lib/tzinfo/timezone_index_definition.rb +1 -6
- data/lib/tzinfo/timezone_info.rb +8 -4
- data/lib/tzinfo/timezone_offset_info.rb +1 -3
- data/lib/tzinfo/timezone_period.rb +31 -6
- data/lib/tzinfo/timezone_transition_info.rb +42 -12
- data/lib/tzinfo/transition_data_timezone_info.rb +223 -0
- data/lib/tzinfo/zoneinfo_country_info.rb +50 -0
- data/lib/tzinfo/zoneinfo_data_source.rb +297 -0
- data/lib/tzinfo/zoneinfo_timezone_info.rb +226 -0
- data/lib/tzinfo.rb +9 -7
- data/test/tc_country.rb +65 -9
- data/test/tc_country_index_definition.rb +27 -6
- data/test/tc_country_info.rb +23 -57
- data/test/tc_country_timezone.rb +23 -3
- data/test/tc_data_source.rb +194 -0
- data/test/tc_data_timezone.rb +23 -3
- data/test/tc_data_timezone_info.rb +30 -272
- data/test/tc_info_timezone.rb +23 -3
- data/test/tc_linked_timezone.rb +23 -4
- data/test/tc_linked_timezone_info.rb +30 -3
- data/test/tc_offset_rationals.rb +23 -3
- data/test/tc_ruby_core_support.rb +117 -31
- data/test/tc_ruby_country_info.rb +102 -0
- data/test/tc_ruby_data_source.rb +145 -0
- data/test/tc_time_or_datetime.rb +222 -19
- data/test/tc_timezone.rb +187 -57
- data/test/tc_timezone_definition.rb +26 -6
- data/test/tc_timezone_index_definition.rb +23 -3
- data/test/tc_timezone_info.rb +23 -3
- data/test/tc_timezone_london.rb +89 -56
- data/test/tc_timezone_melbourne.rb +88 -62
- data/test/tc_timezone_new_york.rb +73 -47
- data/test/tc_timezone_offset_info.rb +36 -4
- data/test/tc_timezone_period.rb +60 -22
- data/test/tc_timezone_proxy.rb +24 -4
- data/test/tc_timezone_transition_info.rb +305 -28
- data/test/tc_timezone_utc.rb +24 -4
- data/test/tc_transition_data_timezone_info.rb +345 -0
- data/test/tc_zoneinfo_country_info.rb +86 -0
- data/test/tc_zoneinfo_data_source.rb +601 -0
- data/test/tc_zoneinfo_timezone_info.rb +663 -0
- data/test/test_utils.rb +116 -21
- data/test/ts_all.rb +24 -4
- data/test/ts_all_ruby.rb +27 -0
- data/test/ts_all_zoneinfo.rb +29 -0
- data/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb +89 -0
- data/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb +313 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb +216 -0
- data/test/tzinfo-data/tzinfo/data/definitions/EST.rb +19 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb +21 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb +21 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb +21 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb +259 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb +184 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb +319 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb +263 -0
- data/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb +218 -0
- data/test/tzinfo-data/tzinfo/data/definitions/UTC.rb +16 -0
- data/test/tzinfo-data/tzinfo/data/indexes/countries.rb +929 -0
- data/test/tzinfo-data/tzinfo/data/indexes/timezones.rb +599 -0
- data/test/tzinfo-data/tzinfo/data/version.rb +36 -0
- data/test/tzinfo-data/tzinfo/data.rb +23 -0
- data/test/zoneinfo/America/Argentina/Buenos_Aires +0 -0
- data/test/zoneinfo/America/New_York +0 -0
- data/test/zoneinfo/Australia/Melbourne +0 -0
- data/test/zoneinfo/EST +0 -0
- data/test/zoneinfo/Etc/UTC +0 -0
- data/test/zoneinfo/Europe/Amsterdam +0 -0
- data/test/zoneinfo/Europe/Andorra +0 -0
- data/test/zoneinfo/Europe/London +0 -0
- data/test/zoneinfo/Europe/Paris +0 -0
- data/test/zoneinfo/Europe/Prague +0 -0
- data/test/zoneinfo/Factory +0 -0
- data/test/zoneinfo/UTC +0 -0
- data/test/zoneinfo/iso3166.tab +276 -0
- data/test/zoneinfo/localtime +0 -0
- data/test/zoneinfo/posix/Europe/London +0 -0
- data/test/zoneinfo/posixrules +0 -0
- data/test/zoneinfo/right/Europe/London +0 -0
- data/test/zoneinfo/zone.tab +444 -0
- metadata +134 -716
- data/.yardopts +0 -8
- data/lib/tzinfo/definitions/Africa/Abidjan.rb +0 -18
- data/lib/tzinfo/definitions/Africa/Accra.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Addis_Ababa.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Algiers.rb +0 -55
- data/lib/tzinfo/definitions/Africa/Asmara.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Asmera.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Bamako.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Bangui.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Banjul.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Bissau.rb +0 -20
- data/lib/tzinfo/definitions/Africa/Blantyre.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Brazzaville.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Bujumbura.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Cairo.rb +0 -247
- data/lib/tzinfo/definitions/Africa/Casablanca.rb +0 -189
- data/lib/tzinfo/definitions/Africa/Ceuta.rb +0 -218
- data/lib/tzinfo/definitions/Africa/Conakry.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Dakar.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Dar_es_Salaam.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Djibouti.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Douala.rb +0 -13
- data/lib/tzinfo/definitions/Africa/El_Aaiun.rb +0 -179
- data/lib/tzinfo/definitions/Africa/Freetown.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Gaborone.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Harare.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Johannesburg.rb +0 -25
- data/lib/tzinfo/definitions/Africa/Juba.rb +0 -54
- data/lib/tzinfo/definitions/Africa/Kampala.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Khartoum.rb +0 -54
- data/lib/tzinfo/definitions/Africa/Kigali.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Kinshasa.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Lagos.rb +0 -23
- data/lib/tzinfo/definitions/Africa/Libreville.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Lome.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Luanda.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Lubumbashi.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Lusaka.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Malabo.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Maputo.rb +0 -18
- data/lib/tzinfo/definitions/Africa/Maseru.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Mbabane.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Mogadishu.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Monrovia.rb +0 -22
- data/lib/tzinfo/definitions/Africa/Nairobi.rb +0 -24
- data/lib/tzinfo/definitions/Africa/Ndjamena.rb +0 -21
- data/lib/tzinfo/definitions/Africa/Niamey.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Nouakchott.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Ouagadougou.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Porto__m__Novo.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Sao_Tome.rb +0 -23
- data/lib/tzinfo/definitions/Africa/Timbuktu.rb +0 -13
- data/lib/tzinfo/definitions/Africa/Tripoli.rb +0 -51
- data/lib/tzinfo/definitions/Africa/Tunis.rb +0 -53
- data/lib/tzinfo/definitions/Africa/Windhoek.rb +0 -74
- data/lib/tzinfo/definitions/America/Adak.rb +0 -242
- data/lib/tzinfo/definitions/America/Anchorage.rb +0 -242
- data/lib/tzinfo/definitions/America/Anguilla.rb +0 -13
- data/lib/tzinfo/definitions/America/Antigua.rb +0 -13
- data/lib/tzinfo/definitions/America/Araguaina.rb +0 -69
- data/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +0 -84
- data/lib/tzinfo/definitions/America/Argentina/Catamarca.rb +0 -84
- data/lib/tzinfo/definitions/America/Argentina/ComodRivadavia.rb +0 -15
- data/lib/tzinfo/definitions/America/Argentina/Cordoba.rb +0 -84
- data/lib/tzinfo/definitions/America/Argentina/Jujuy.rb +0 -82
- data/lib/tzinfo/definitions/America/Argentina/La_Rioja.rb +0 -85
- data/lib/tzinfo/definitions/America/Argentina/Mendoza.rb +0 -84
- data/lib/tzinfo/definitions/America/Argentina/Rio_Gallegos.rb +0 -84
- data/lib/tzinfo/definitions/America/Argentina/Salta.rb +0 -82
- data/lib/tzinfo/definitions/America/Argentina/San_Juan.rb +0 -85
- data/lib/tzinfo/definitions/America/Argentina/San_Luis.rb +0 -85
- data/lib/tzinfo/definitions/America/Argentina/Tucuman.rb +0 -86
- data/lib/tzinfo/definitions/America/Argentina/Ushuaia.rb +0 -84
- data/lib/tzinfo/definitions/America/Aruba.rb +0 -13
- data/lib/tzinfo/definitions/America/Asuncion.rb +0 -220
- data/lib/tzinfo/definitions/America/Atikokan.rb +0 -13
- data/lib/tzinfo/definitions/America/Atka.rb +0 -13
- data/lib/tzinfo/definitions/America/Bahia.rb +0 -79
- data/lib/tzinfo/definitions/America/Bahia_Banderas.rb +0 -84
- data/lib/tzinfo/definitions/America/Barbados.rb +0 -34
- data/lib/tzinfo/definitions/America/Belem.rb +0 -47
- data/lib/tzinfo/definitions/America/Belize.rb +0 -119
- data/lib/tzinfo/definitions/America/Blanc__m__Sablon.rb +0 -13
- data/lib/tzinfo/definitions/America/Boa_Vista.rb +0 -51
- data/lib/tzinfo/definitions/America/Bogota.rb +0 -23
- data/lib/tzinfo/definitions/America/Boise.rb +0 -245
- data/lib/tzinfo/definitions/America/Buenos_Aires.rb +0 -13
- data/lib/tzinfo/definitions/America/Cambridge_Bay.rb +0 -232
- data/lib/tzinfo/definitions/America/Campo_Grande.rb +0 -109
- data/lib/tzinfo/definitions/America/Cancun.rb +0 -62
- data/lib/tzinfo/definitions/America/Caracas.rb +0 -24
- data/lib/tzinfo/definitions/America/Catamarca.rb +0 -13
- data/lib/tzinfo/definitions/America/Cayenne.rb +0 -20
- data/lib/tzinfo/definitions/America/Cayman.rb +0 -13
- data/lib/tzinfo/definitions/America/Chicago.rb +0 -329
- data/lib/tzinfo/definitions/America/Chihuahua.rb +0 -80
- data/lib/tzinfo/definitions/America/Ciudad_Juarez.rb +0 -183
- data/lib/tzinfo/definitions/America/Coral_Harbour.rb +0 -13
- data/lib/tzinfo/definitions/America/Cordoba.rb +0 -13
- data/lib/tzinfo/definitions/America/Costa_Rica.rb +0 -29
- data/lib/tzinfo/definitions/America/Creston.rb +0 -13
- data/lib/tzinfo/definitions/America/Cuiaba.rb +0 -107
- data/lib/tzinfo/definitions/America/Curacao.rb +0 -13
- data/lib/tzinfo/definitions/America/Danmarkshavn.rb +0 -53
- data/lib/tzinfo/definitions/America/Dawson.rb +0 -117
- data/lib/tzinfo/definitions/America/Dawson_Creek.rb +0 -79
- data/lib/tzinfo/definitions/America/Denver.rb +0 -250
- data/lib/tzinfo/definitions/America/Detroit.rb +0 -234
- data/lib/tzinfo/definitions/America/Dominica.rb +0 -13
- data/lib/tzinfo/definitions/America/Edmonton.rb +0 -242
- data/lib/tzinfo/definitions/America/Eirunepe.rb +0 -52
- data/lib/tzinfo/definitions/America/El_Salvador.rb +0 -23
- data/lib/tzinfo/definitions/America/Ensenada.rb +0 -13
- data/lib/tzinfo/definitions/America/Fort_Nelson.rb +0 -164
- data/lib/tzinfo/definitions/America/Fort_Wayne.rb +0 -13
- data/lib/tzinfo/definitions/America/Fortaleza.rb +0 -57
- data/lib/tzinfo/definitions/America/Glace_Bay.rb +0 -232
- data/lib/tzinfo/definitions/America/Godthab.rb +0 -13
- data/lib/tzinfo/definitions/America/Goose_Bay.rb +0 -301
- data/lib/tzinfo/definitions/America/Grand_Turk.rb +0 -207
- data/lib/tzinfo/definitions/America/Grenada.rb +0 -13
- data/lib/tzinfo/definitions/America/Guadeloupe.rb +0 -13
- data/lib/tzinfo/definitions/America/Guatemala.rb +0 -27
- data/lib/tzinfo/definitions/America/Guayaquil.rb +0 -23
- data/lib/tzinfo/definitions/America/Guyana.rb +0 -23
- data/lib/tzinfo/definitions/America/Halifax.rb +0 -320
- data/lib/tzinfo/definitions/America/Havana.rb +0 -247
- data/lib/tzinfo/definitions/America/Hermosillo.rb +0 -35
- data/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb +0 -195
- data/lib/tzinfo/definitions/America/Indiana/Knox.rb +0 -249
- data/lib/tzinfo/definitions/America/Indiana/Marengo.rb +0 -199
- data/lib/tzinfo/definitions/America/Indiana/Petersburg.rb +0 -212
- data/lib/tzinfo/definitions/America/Indiana/Tell_City.rb +0 -194
- data/lib/tzinfo/definitions/America/Indiana/Vevay.rb +0 -177
- data/lib/tzinfo/definitions/America/Indiana/Vincennes.rb +0 -197
- data/lib/tzinfo/definitions/America/Indiana/Winamac.rb +0 -203
- data/lib/tzinfo/definitions/America/Indianapolis.rb +0 -13
- data/lib/tzinfo/definitions/America/Inuvik.rb +0 -225
- data/lib/tzinfo/definitions/America/Iqaluit.rb +0 -229
- data/lib/tzinfo/definitions/America/Jamaica.rb +0 -41
- data/lib/tzinfo/definitions/America/Jujuy.rb +0 -13
- data/lib/tzinfo/definitions/America/Juneau.rb +0 -241
- data/lib/tzinfo/definitions/America/Kentucky/Louisville.rb +0 -274
- data/lib/tzinfo/definitions/America/Kentucky/Monticello.rb +0 -244
- data/lib/tzinfo/definitions/America/Knox_IN.rb +0 -13
- data/lib/tzinfo/definitions/America/Kralendijk.rb +0 -13
- data/lib/tzinfo/definitions/America/La_Paz.rb +0 -22
- data/lib/tzinfo/definitions/America/Lima.rb +0 -35
- data/lib/tzinfo/definitions/America/Los_Angeles.rb +0 -278
- data/lib/tzinfo/definitions/America/Louisville.rb +0 -13
- data/lib/tzinfo/definitions/America/Lower_Princes.rb +0 -13
- data/lib/tzinfo/definitions/America/Maceio.rb +0 -59
- data/lib/tzinfo/definitions/America/Managua.rb +0 -36
- data/lib/tzinfo/definitions/America/Manaus.rb +0 -49
- data/lib/tzinfo/definitions/America/Marigot.rb +0 -13
- data/lib/tzinfo/definitions/America/Martinique.rb +0 -23
- data/lib/tzinfo/definitions/America/Matamoros.rb +0 -177
- data/lib/tzinfo/definitions/America/Mazatlan.rb +0 -83
- data/lib/tzinfo/definitions/America/Mendoza.rb +0 -13
- data/lib/tzinfo/definitions/America/Menominee.rb +0 -236
- data/lib/tzinfo/definitions/America/Merida.rb +0 -76
- data/lib/tzinfo/definitions/America/Metlakatla.rb +0 -176
- data/lib/tzinfo/definitions/America/Mexico_City.rb +0 -89
- data/lib/tzinfo/definitions/America/Miquelon.rb +0 -195
- data/lib/tzinfo/definitions/America/Moncton.rb +0 -300
- data/lib/tzinfo/definitions/America/Monterrey.rb +0 -75
- data/lib/tzinfo/definitions/America/Montevideo.rb +0 -110
- data/lib/tzinfo/definitions/America/Montreal.rb +0 -13
- data/lib/tzinfo/definitions/America/Montserrat.rb +0 -13
- data/lib/tzinfo/definitions/America/Nassau.rb +0 -13
- data/lib/tzinfo/definitions/America/New_York.rb +0 -328
- data/lib/tzinfo/definitions/America/Nipigon.rb +0 -13
- data/lib/tzinfo/definitions/America/Nome.rb +0 -242
- data/lib/tzinfo/definitions/America/Noronha.rb +0 -57
- data/lib/tzinfo/definitions/America/North_Dakota/Beulah.rb +0 -246
- data/lib/tzinfo/definitions/America/North_Dakota/Center.rb +0 -246
- data/lib/tzinfo/definitions/America/North_Dakota/New_Salem.rb +0 -246
- data/lib/tzinfo/definitions/America/Nuuk.rb +0 -209
- data/lib/tzinfo/definitions/America/Ojinaga.rb +0 -182
- data/lib/tzinfo/definitions/America/Panama.rb +0 -20
- data/lib/tzinfo/definitions/America/Pangnirtung.rb +0 -13
- data/lib/tzinfo/definitions/America/Paramaribo.rb +0 -24
- data/lib/tzinfo/definitions/America/Phoenix.rb +0 -30
- data/lib/tzinfo/definitions/America/Port__m__au__m__Prince.rb +0 -177
- data/lib/tzinfo/definitions/America/Port_of_Spain.rb +0 -13
- data/lib/tzinfo/definitions/America/Porto_Acre.rb +0 -13
- data/lib/tzinfo/definitions/America/Porto_Velho.rb +0 -47
- data/lib/tzinfo/definitions/America/Puerto_Rico.rb +0 -23
- data/lib/tzinfo/definitions/America/Punta_Arenas.rb +0 -139
- data/lib/tzinfo/definitions/America/Rainy_River.rb +0 -13
- data/lib/tzinfo/definitions/America/Rankin_Inlet.rb +0 -224
- data/lib/tzinfo/definitions/America/Recife.rb +0 -57
- data/lib/tzinfo/definitions/America/Regina.rb +0 -74
- data/lib/tzinfo/definitions/America/Resolute.rb +0 -224
- data/lib/tzinfo/definitions/America/Rio_Branco.rb +0 -50
- data/lib/tzinfo/definitions/America/Rosario.rb +0 -13
- data/lib/tzinfo/definitions/America/Santa_Isabel.rb +0 -13
- data/lib/tzinfo/definitions/America/Santarem.rb +0 -49
- data/lib/tzinfo/definitions/America/Santiago.rb +0 -251
- data/lib/tzinfo/definitions/America/Santo_Domingo.rb +0 -38
- data/lib/tzinfo/definitions/America/Sao_Paulo.rb +0 -109
- data/lib/tzinfo/definitions/America/Scoresbysund.rb +0 -209
- data/lib/tzinfo/definitions/America/Shiprock.rb +0 -13
- data/lib/tzinfo/definitions/America/Sitka.rb +0 -240
- data/lib/tzinfo/definitions/America/St_Barthelemy.rb +0 -13
- data/lib/tzinfo/definitions/America/St_Johns.rb +0 -334
- data/lib/tzinfo/definitions/America/St_Kitts.rb +0 -13
- data/lib/tzinfo/definitions/America/St_Lucia.rb +0 -13
- data/lib/tzinfo/definitions/America/St_Thomas.rb +0 -13
- data/lib/tzinfo/definitions/America/St_Vincent.rb +0 -13
- data/lib/tzinfo/definitions/America/Swift_Current.rb +0 -44
- data/lib/tzinfo/definitions/America/Tegucigalpa.rb +0 -25
- data/lib/tzinfo/definitions/America/Thule.rb +0 -185
- data/lib/tzinfo/definitions/America/Thunder_Bay.rb +0 -13
- data/lib/tzinfo/definitions/America/Tijuana.rb +0 -242
- data/lib/tzinfo/definitions/America/Toronto.rb +0 -325
- data/lib/tzinfo/definitions/America/Tortola.rb +0 -13
- data/lib/tzinfo/definitions/America/Vancouver.rb +0 -282
- data/lib/tzinfo/definitions/America/Virgin.rb +0 -13
- data/lib/tzinfo/definitions/America/Whitehorse.rb +0 -117
- data/lib/tzinfo/definitions/America/Winnipeg.rb +0 -278
- data/lib/tzinfo/definitions/America/Yakutat.rb +0 -239
- data/lib/tzinfo/definitions/America/Yellowknife.rb +0 -13
- data/lib/tzinfo/definitions/Antarctica/Casey.rb +0 -30
- data/lib/tzinfo/definitions/Antarctica/Davis.rb +0 -25
- data/lib/tzinfo/definitions/Antarctica/DumontDUrville.rb +0 -13
- data/lib/tzinfo/definitions/Antarctica/Macquarie.rb +0 -233
- data/lib/tzinfo/definitions/Antarctica/Mawson.rb +0 -20
- data/lib/tzinfo/definitions/Antarctica/McMurdo.rb +0 -13
- data/lib/tzinfo/definitions/Antarctica/Palmer.rb +0 -102
- data/lib/tzinfo/definitions/Antarctica/Rothera.rb +0 -18
- data/lib/tzinfo/definitions/Antarctica/South_Pole.rb +0 -13
- data/lib/tzinfo/definitions/Antarctica/Syowa.rb +0 -13
- data/lib/tzinfo/definitions/Antarctica/Troll.rb +0 -157
- data/lib/tzinfo/definitions/Antarctica/Vostok.rb +0 -13
- data/lib/tzinfo/definitions/Arctic/Longyearbyen.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Aden.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Almaty.rb +0 -71
- data/lib/tzinfo/definitions/Asia/Amman.rb +0 -106
- data/lib/tzinfo/definitions/Asia/Anadyr.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Aqtau.rb +0 -71
- data/lib/tzinfo/definitions/Asia/Aqtobe.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Ashgabat.rb +0 -45
- data/lib/tzinfo/definitions/Asia/Ashkhabad.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Atyrau.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Baghdad.rb +0 -73
- data/lib/tzinfo/definitions/Asia/Bahrain.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Baku.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Bangkok.rb +0 -20
- data/lib/tzinfo/definitions/Asia/Barnaul.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Beirut.rb +0 -231
- data/lib/tzinfo/definitions/Asia/Bishkek.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Brunei.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Calcutta.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Chita.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Choibalsan.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Chongqing.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Chungking.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Colombo.rb +0 -30
- data/lib/tzinfo/definitions/Asia/Dacca.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Damascus.rb +0 -140
- data/lib/tzinfo/definitions/Asia/Dhaka.rb +0 -28
- data/lib/tzinfo/definitions/Asia/Dili.rb +0 -22
- data/lib/tzinfo/definitions/Asia/Dubai.rb +0 -18
- data/lib/tzinfo/definitions/Asia/Dushanbe.rb +0 -44
- data/lib/tzinfo/definitions/Asia/Famagusta.rb +0 -217
- data/lib/tzinfo/definitions/Asia/Gaza.rb +0 -274
- data/lib/tzinfo/definitions/Asia/Harbin.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Hebron.rb +0 -276
- data/lib/tzinfo/definitions/Asia/Ho_Chi_Minh.rb +0 -29
- data/lib/tzinfo/definitions/Asia/Hong_Kong.rb +0 -89
- data/lib/tzinfo/definitions/Asia/Hovd.rb +0 -69
- data/lib/tzinfo/definitions/Asia/Irkutsk.rb +0 -88
- data/lib/tzinfo/definitions/Asia/Istanbul.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Jakarta.rb +0 -30
- data/lib/tzinfo/definitions/Asia/Jayapura.rb +0 -22
- data/lib/tzinfo/definitions/Asia/Jerusalem.rb +0 -241
- data/lib/tzinfo/definitions/Asia/Kabul.rb +0 -20
- data/lib/tzinfo/definitions/Asia/Kamchatka.rb +0 -84
- data/lib/tzinfo/definitions/Asia/Karachi.rb +0 -32
- data/lib/tzinfo/definitions/Asia/Kashgar.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Kathmandu.rb +0 -20
- data/lib/tzinfo/definitions/Asia/Katmandu.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Khandyga.rb +0 -90
- data/lib/tzinfo/definitions/Asia/Kolkata.rb +0 -27
- data/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Kuching.rb +0 -38
- data/lib/tzinfo/definitions/Asia/Kuwait.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Macao.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Macau.rb +0 -91
- data/lib/tzinfo/definitions/Asia/Magadan.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Makassar.rb +0 -24
- data/lib/tzinfo/definitions/Asia/Manila.rb +0 -30
- data/lib/tzinfo/definitions/Asia/Muscat.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Nicosia.rb +0 -217
- data/lib/tzinfo/definitions/Asia/Novokuznetsk.rb +0 -84
- data/lib/tzinfo/definitions/Asia/Novosibirsk.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Omsk.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Oral.rb +0 -73
- data/lib/tzinfo/definitions/Asia/Phnom_Penh.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Pontianak.rb +0 -30
- data/lib/tzinfo/definitions/Asia/Pyongyang.rb +0 -24
- data/lib/tzinfo/definitions/Asia/Qatar.rb +0 -20
- data/lib/tzinfo/definitions/Asia/Qostanay.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Qyzylorda.rb +0 -73
- data/lib/tzinfo/definitions/Asia/Rangoon.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Riyadh.rb +0 -18
- data/lib/tzinfo/definitions/Asia/Saigon.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Sakhalin.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Samarkand.rb +0 -44
- data/lib/tzinfo/definitions/Asia/Seoul.rb +0 -50
- data/lib/tzinfo/definitions/Asia/Shanghai.rb +0 -47
- data/lib/tzinfo/definitions/Asia/Singapore.rb +0 -31
- data/lib/tzinfo/definitions/Asia/Srednekolymsk.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Taipei.rb +0 -60
- data/lib/tzinfo/definitions/Asia/Tashkent.rb +0 -44
- data/lib/tzinfo/definitions/Asia/Tbilisi.rb +0 -73
- data/lib/tzinfo/definitions/Asia/Tehran.rb +0 -92
- data/lib/tzinfo/definitions/Asia/Tel_Aviv.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Thimbu.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Thimphu.rb +0 -20
- data/lib/tzinfo/definitions/Asia/Tokyo.rb +0 -27
- data/lib/tzinfo/definitions/Asia/Tomsk.rb +0 -87
- data/lib/tzinfo/definitions/Asia/Ujung_Pandang.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb +0 -69
- data/lib/tzinfo/definitions/Asia/Ulan_Bator.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Urumqi.rb +0 -18
- data/lib/tzinfo/definitions/Asia/Ust__m__Nera.rb +0 -89
- data/lib/tzinfo/definitions/Asia/Vientiane.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Vladivostok.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Yakutsk.rb +0 -86
- data/lib/tzinfo/definitions/Asia/Yangon.rb +0 -23
- data/lib/tzinfo/definitions/Asia/Yekaterinburg.rb +0 -88
- data/lib/tzinfo/definitions/Asia/Yerevan.rb +0 -82
- data/lib/tzinfo/definitions/Atlantic/Azores.rb +0 -318
- data/lib/tzinfo/definitions/Atlantic/Bermuda.rb +0 -248
- data/lib/tzinfo/definitions/Atlantic/Canary.rb +0 -209
- data/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb +0 -23
- data/lib/tzinfo/definitions/Atlantic/Faeroe.rb +0 -13
- data/lib/tzinfo/definitions/Atlantic/Faroe.rb +0 -205
- data/lib/tzinfo/definitions/Atlantic/Jan_Mayen.rb +0 -13
- data/lib/tzinfo/definitions/Atlantic/Madeira.rb +0 -317
- data/lib/tzinfo/definitions/Atlantic/Reykjavik.rb +0 -13
- data/lib/tzinfo/definitions/Atlantic/South_Georgia.rb +0 -18
- data/lib/tzinfo/definitions/Atlantic/St_Helena.rb +0 -13
- data/lib/tzinfo/definitions/Atlantic/Stanley.rb +0 -91
- data/lib/tzinfo/definitions/Australia/ACT.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Adelaide.rb +0 -233
- data/lib/tzinfo/definitions/Australia/Brisbane.rb +0 -35
- data/lib/tzinfo/definitions/Australia/Broken_Hill.rb +0 -235
- data/lib/tzinfo/definitions/Australia/Canberra.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Currie.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Darwin.rb +0 -29
- data/lib/tzinfo/definitions/Australia/Eucla.rb +0 -37
- data/lib/tzinfo/definitions/Australia/Hobart.rb +0 -243
- data/lib/tzinfo/definitions/Australia/LHI.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Lindeman.rb +0 -39
- data/lib/tzinfo/definitions/Australia/Lord_Howe.rb +0 -206
- data/lib/tzinfo/definitions/Australia/Melbourne.rb +0 -231
- data/lib/tzinfo/definitions/Australia/NSW.rb +0 -13
- data/lib/tzinfo/definitions/Australia/North.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Perth.rb +0 -37
- data/lib/tzinfo/definitions/Australia/Queensland.rb +0 -13
- data/lib/tzinfo/definitions/Australia/South.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Sydney.rb +0 -231
- data/lib/tzinfo/definitions/Australia/Tasmania.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Victoria.rb +0 -13
- data/lib/tzinfo/definitions/Australia/West.rb +0 -13
- data/lib/tzinfo/definitions/Australia/Yancowinna.rb +0 -13
- data/lib/tzinfo/definitions/Brazil/Acre.rb +0 -13
- data/lib/tzinfo/definitions/Brazil/DeNoronha.rb +0 -13
- data/lib/tzinfo/definitions/Brazil/East.rb +0 -13
- data/lib/tzinfo/definitions/Brazil/West.rb +0 -13
- data/lib/tzinfo/definitions/CET.rb +0 -223
- data/lib/tzinfo/definitions/CST6CDT.rb +0 -238
- data/lib/tzinfo/definitions/Canada/Atlantic.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Central.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Eastern.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Mountain.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Newfoundland.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Pacific.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Saskatchewan.rb +0 -13
- data/lib/tzinfo/definitions/Canada/Yukon.rb +0 -13
- data/lib/tzinfo/definitions/Chile/Continental.rb +0 -13
- data/lib/tzinfo/definitions/Chile/EasterIsland.rb +0 -13
- data/lib/tzinfo/definitions/Cuba.rb +0 -11
- data/lib/tzinfo/definitions/EET.rb +0 -209
- data/lib/tzinfo/definitions/EST.rb +0 -14
- data/lib/tzinfo/definitions/EST5EDT.rb +0 -238
- data/lib/tzinfo/definitions/Egypt.rb +0 -11
- data/lib/tzinfo/definitions/Eire.rb +0 -11
- data/lib/tzinfo/definitions/Etc/GMT.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT0.rb +0 -13
- data/lib/tzinfo/definitions/Etc/GMT__m__0.rb +0 -13
- data/lib/tzinfo/definitions/Etc/GMT__m__1.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__10.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__11.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__12.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__13.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__14.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__2.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__3.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__4.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__5.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__6.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__7.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__8.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__m__9.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__0.rb +0 -13
- data/lib/tzinfo/definitions/Etc/GMT__p__1.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__10.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__11.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__12.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__2.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__3.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__4.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__5.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__6.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__7.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__8.rb +0 -16
- data/lib/tzinfo/definitions/Etc/GMT__p__9.rb +0 -16
- data/lib/tzinfo/definitions/Etc/Greenwich.rb +0 -13
- data/lib/tzinfo/definitions/Etc/UCT.rb +0 -13
- data/lib/tzinfo/definitions/Etc/UTC.rb +0 -16
- data/lib/tzinfo/definitions/Etc/Universal.rb +0 -13
- data/lib/tzinfo/definitions/Etc/Zulu.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Amsterdam.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Andorra.rb +0 -199
- data/lib/tzinfo/definitions/Europe/Astrakhan.rb +0 -84
- data/lib/tzinfo/definitions/Europe/Athens.rb +0 -231
- data/lib/tzinfo/definitions/Europe/Belfast.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Belgrade.rb +0 -209
- data/lib/tzinfo/definitions/Europe/Berlin.rb +0 -234
- data/lib/tzinfo/definitions/Europe/Bratislava.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Brussels.rb +0 -278
- data/lib/tzinfo/definitions/Europe/Bucharest.rb +0 -227
- data/lib/tzinfo/definitions/Europe/Budapest.rb +0 -241
- data/lib/tzinfo/definitions/Europe/Busingen.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Chisinau.rb +0 -237
- data/lib/tzinfo/definitions/Europe/Copenhagen.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Dublin.rb +0 -322
- data/lib/tzinfo/definitions/Europe/Gibraltar.rb +0 -291
- data/lib/tzinfo/definitions/Europe/Guernsey.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Helsinki.rb +0 -209
- data/lib/tzinfo/definitions/Europe/Isle_of_Man.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Istanbul.rb +0 -136
- data/lib/tzinfo/definitions/Europe/Jersey.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Kaliningrad.rb +0 -103
- data/lib/tzinfo/definitions/Europe/Kiev.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Kirov.rb +0 -85
- data/lib/tzinfo/definitions/Europe/Kyiv.rb +0 -216
- data/lib/tzinfo/definitions/Europe/Lisbon.rb +0 -316
- data/lib/tzinfo/definitions/Europe/Ljubljana.rb +0 -13
- data/lib/tzinfo/definitions/Europe/London.rb +0 -334
- data/lib/tzinfo/definitions/Europe/Luxembourg.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Madrid.rb +0 -255
- data/lib/tzinfo/definitions/Europe/Malta.rb +0 -259
- data/lib/tzinfo/definitions/Europe/Mariehamn.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Minsk.rb +0 -92
- data/lib/tzinfo/definitions/Europe/Monaco.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Moscow.rb +0 -104
- data/lib/tzinfo/definitions/Europe/Nicosia.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Oslo.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Paris.rb +0 -278
- data/lib/tzinfo/definitions/Europe/Podgorica.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Prague.rb +0 -236
- data/lib/tzinfo/definitions/Europe/Riga.rb +0 -222
- data/lib/tzinfo/definitions/Europe/Rome.rb +0 -261
- data/lib/tzinfo/definitions/Europe/Samara.rb +0 -85
- data/lib/tzinfo/definitions/Europe/San_Marino.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Sarajevo.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Saratov.rb +0 -84
- data/lib/tzinfo/definitions/Europe/Simferopol.rb +0 -99
- data/lib/tzinfo/definitions/Europe/Skopje.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Sofia.rb +0 -219
- data/lib/tzinfo/definitions/Europe/Stockholm.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Tallinn.rb +0 -218
- data/lib/tzinfo/definitions/Europe/Tirane.rb +0 -223
- data/lib/tzinfo/definitions/Europe/Tiraspol.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Ulyanovsk.rb +0 -88
- data/lib/tzinfo/definitions/Europe/Uzhgorod.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Vaduz.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Vatican.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Vienna.rb +0 -229
- data/lib/tzinfo/definitions/Europe/Vilnius.rb +0 -216
- data/lib/tzinfo/definitions/Europe/Volgograd.rb +0 -87
- data/lib/tzinfo/definitions/Europe/Warsaw.rb +0 -258
- data/lib/tzinfo/definitions/Europe/Zagreb.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Zaporozhye.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Zurich.rb +0 -211
- data/lib/tzinfo/definitions/Factory.rb +0 -14
- data/lib/tzinfo/definitions/GB.rb +0 -11
- data/lib/tzinfo/definitions/GB__m__Eire.rb +0 -11
- data/lib/tzinfo/definitions/GMT.rb +0 -11
- data/lib/tzinfo/definitions/GMT0.rb +0 -11
- data/lib/tzinfo/definitions/GMT__m__0.rb +0 -11
- data/lib/tzinfo/definitions/GMT__p__0.rb +0 -11
- data/lib/tzinfo/definitions/Greenwich.rb +0 -11
- data/lib/tzinfo/definitions/HST.rb +0 -14
- data/lib/tzinfo/definitions/Hongkong.rb +0 -11
- data/lib/tzinfo/definitions/Iceland.rb +0 -11
- data/lib/tzinfo/definitions/Indian/Antananarivo.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Chagos.rb +0 -20
- data/lib/tzinfo/definitions/Indian/Christmas.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Cocos.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Comoro.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Kerguelen.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Mahe.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Maldives.rb +0 -20
- data/lib/tzinfo/definitions/Indian/Mauritius.rb +0 -23
- data/lib/tzinfo/definitions/Indian/Mayotte.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Reunion.rb +0 -13
- data/lib/tzinfo/definitions/Iran.rb +0 -11
- data/lib/tzinfo/definitions/Israel.rb +0 -11
- data/lib/tzinfo/definitions/Jamaica.rb +0 -11
- data/lib/tzinfo/definitions/Japan.rb +0 -11
- data/lib/tzinfo/definitions/Kwajalein.rb +0 -11
- data/lib/tzinfo/definitions/Libya.rb +0 -11
- data/lib/tzinfo/definitions/MET.rb +0 -223
- data/lib/tzinfo/definitions/MST.rb +0 -14
- data/lib/tzinfo/definitions/MST7MDT.rb +0 -238
- data/lib/tzinfo/definitions/Mexico/BajaNorte.rb +0 -13
- data/lib/tzinfo/definitions/Mexico/BajaSur.rb +0 -13
- data/lib/tzinfo/definitions/Mexico/General.rb +0 -13
- data/lib/tzinfo/definitions/NZ.rb +0 -11
- data/lib/tzinfo/definitions/NZ__m__CHAT.rb +0 -11
- data/lib/tzinfo/definitions/Navajo.rb +0 -11
- data/lib/tzinfo/definitions/PRC.rb +0 -11
- data/lib/tzinfo/definitions/PST8PDT.rb +0 -238
- data/lib/tzinfo/definitions/Pacific/Apia.rb +0 -48
- data/lib/tzinfo/definitions/Pacific/Auckland.rb +0 -248
- data/lib/tzinfo/definitions/Pacific/Bougainville.rb +0 -25
- data/lib/tzinfo/definitions/Pacific/Chatham.rb +0 -219
- data/lib/tzinfo/definitions/Pacific/Chuuk.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Easter.rb +0 -231
- data/lib/tzinfo/definitions/Pacific/Efate.rb +0 -41
- data/lib/tzinfo/definitions/Pacific/Enderbury.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Fakaofo.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Fiji.rb +0 -47
- data/lib/tzinfo/definitions/Pacific/Funafuti.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Galapagos.rb +0 -23
- data/lib/tzinfo/definitions/Pacific/Gambier.rb +0 -18
- data/lib/tzinfo/definitions/Pacific/Guadalcanal.rb +0 -18
- data/lib/tzinfo/definitions/Pacific/Guam.rb +0 -42
- data/lib/tzinfo/definitions/Pacific/Honolulu.rb +0 -28
- data/lib/tzinfo/definitions/Pacific/Johnston.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Kanton.rb +0 -22
- data/lib/tzinfo/definitions/Pacific/Kiritimati.rb +0 -22
- data/lib/tzinfo/definitions/Pacific/Kosrae.rb +0 -30
- data/lib/tzinfo/definitions/Pacific/Kwajalein.rb +0 -27
- data/lib/tzinfo/definitions/Pacific/Majuro.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Marquesas.rb +0 -18
- data/lib/tzinfo/definitions/Pacific/Midway.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Nauru.rb +0 -23
- data/lib/tzinfo/definitions/Pacific/Niue.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Norfolk.rb +0 -134
- data/lib/tzinfo/definitions/Pacific/Noumea.rb +0 -25
- data/lib/tzinfo/definitions/Pacific/Pago_Pago.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Palau.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Pitcairn.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Pohnpei.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Ponape.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Port_Moresby.rb +0 -20
- data/lib/tzinfo/definitions/Pacific/Rarotonga.rb +0 -48
- data/lib/tzinfo/definitions/Pacific/Saipan.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Samoa.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Tahiti.rb +0 -18
- data/lib/tzinfo/definitions/Pacific/Tarawa.rb +0 -18
- data/lib/tzinfo/definitions/Pacific/Tongatapu.rb +0 -29
- data/lib/tzinfo/definitions/Pacific/Truk.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Wake.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Wallis.rb +0 -13
- data/lib/tzinfo/definitions/Pacific/Yap.rb +0 -13
- data/lib/tzinfo/definitions/Poland.rb +0 -11
- data/lib/tzinfo/definitions/Portugal.rb +0 -11
- data/lib/tzinfo/definitions/ROC.rb +0 -11
- data/lib/tzinfo/definitions/ROK.rb +0 -11
- data/lib/tzinfo/definitions/Singapore.rb +0 -11
- data/lib/tzinfo/definitions/Turkey.rb +0 -11
- data/lib/tzinfo/definitions/UCT.rb +0 -11
- data/lib/tzinfo/definitions/US/Alaska.rb +0 -13
- data/lib/tzinfo/definitions/US/Aleutian.rb +0 -13
- data/lib/tzinfo/definitions/US/Arizona.rb +0 -13
- data/lib/tzinfo/definitions/US/Central.rb +0 -13
- data/lib/tzinfo/definitions/US/East__m__Indiana.rb +0 -13
- data/lib/tzinfo/definitions/US/Eastern.rb +0 -13
- data/lib/tzinfo/definitions/US/Hawaii.rb +0 -13
- data/lib/tzinfo/definitions/US/Indiana__m__Starke.rb +0 -13
- data/lib/tzinfo/definitions/US/Michigan.rb +0 -13
- data/lib/tzinfo/definitions/US/Mountain.rb +0 -13
- data/lib/tzinfo/definitions/US/Pacific.rb +0 -13
- data/lib/tzinfo/definitions/US/Samoa.rb +0 -13
- data/lib/tzinfo/definitions/UTC.rb +0 -11
- data/lib/tzinfo/definitions/Universal.rb +0 -11
- data/lib/tzinfo/definitions/WET.rb +0 -209
- data/lib/tzinfo/definitions/W__m__SU.rb +0 -11
- data/lib/tzinfo/definitions/Zulu.rb +0 -11
- data/lib/tzinfo/indexes/countries.rb +0 -924
- data/lib/tzinfo/indexes/timezones.rb +0 -607
- data/lib/tzinfo/tzdataparser.rb +0 -1287
- data/test/in_load_path/payload.rb +0 -1
- data/tzinfo.gemspec +0 -19
@@ -0,0 +1,601 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2012-2013 Philip Ross
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
# of this software and associated documentation files (the "Software"), to deal
|
6
|
+
# in the Software without restriction, including without limitation the rights
|
7
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
# copies of the Software, and to permit persons to whom the Software is
|
9
|
+
# furnished to do so, subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
# THE SOFTWARE.
|
21
|
+
#++
|
22
|
+
|
23
|
+
require File.join(File.expand_path(File.dirname(__FILE__)), 'test_utils')
|
24
|
+
require 'fileutils'
|
25
|
+
require 'pathname'
|
26
|
+
require 'tmpdir'
|
27
|
+
|
28
|
+
include TZInfo
|
29
|
+
|
30
|
+
class TCZoneinfoDataSource < Test::Unit::TestCase
|
31
|
+
ZONEINFO_DIR = File.join(File.expand_path(File.dirname(__FILE__)), 'zoneinfo').untaint
|
32
|
+
|
33
|
+
def setup
|
34
|
+
@orig_search_path = ZoneinfoDataSource.search_path.clone
|
35
|
+
@orig_pwd = FileUtils.pwd
|
36
|
+
|
37
|
+
# A zoneinfo directory containing files needed by the tests.
|
38
|
+
# The symlinks in this directory are set up in test_utils.rb.
|
39
|
+
@data_source = ZoneinfoDataSource.new(ZONEINFO_DIR)
|
40
|
+
end
|
41
|
+
|
42
|
+
def teardown
|
43
|
+
ZoneinfoDataSource.search_path = @orig_search_path
|
44
|
+
FileUtils.chdir(@orig_pwd)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_default_search_path
|
48
|
+
assert_equal(['/usr/share/zoneinfo', '/usr/share/lib/zoneinfo', '/etc/zoneinfo'], ZoneinfoDataSource.search_path)
|
49
|
+
assert_equal(false, ZoneinfoDataSource.search_path.frozen?)
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_set_search_path_default
|
53
|
+
ZoneinfoDataSource.search_path = ['/tmp/zoneinfo1', '/tmp/zoneinfo2']
|
54
|
+
assert_equal(['/tmp/zoneinfo1', '/tmp/zoneinfo2'], ZoneinfoDataSource.search_path)
|
55
|
+
|
56
|
+
ZoneinfoDataSource.search_path = nil
|
57
|
+
assert_equal(['/usr/share/zoneinfo', '/usr/share/lib/zoneinfo', '/etc/zoneinfo'], ZoneinfoDataSource.search_path)
|
58
|
+
assert_equal(false, ZoneinfoDataSource.search_path.frozen?)
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_set_search_path_array
|
62
|
+
path = ['/tmp/zoneinfo1', '/tmp/zoneinfo2']
|
63
|
+
ZoneinfoDataSource.search_path = path
|
64
|
+
assert_equal(['/tmp/zoneinfo1', '/tmp/zoneinfo2'], ZoneinfoDataSource.search_path)
|
65
|
+
assert_not_same(path, ZoneinfoDataSource.search_path)
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_set_search_path_array_to_s
|
69
|
+
ZoneinfoDataSource.search_path = [Pathname.new('/tmp/zoneinfo3')]
|
70
|
+
assert_equal(['/tmp/zoneinfo3'], ZoneinfoDataSource.search_path)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_set_search_path_string
|
74
|
+
ZoneinfoDataSource.search_path = ['/tmp/zoneinfo4', '/tmp/zoneinfo5'].join(File::PATH_SEPARATOR)
|
75
|
+
assert_equal(['/tmp/zoneinfo4', '/tmp/zoneinfo5'], ZoneinfoDataSource.search_path)
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_new_search
|
79
|
+
Dir.mktmpdir('tzinfo_test_dir1') do |dir1|
|
80
|
+
Dir.mktmpdir('tzinfo_test_dir2') do |dir2|
|
81
|
+
Dir.mktmpdir('tzinfo_test_dir3') do |dir3|
|
82
|
+
Dir.mktmpdir('tzinfo_test_dir4') do |dir4|
|
83
|
+
file = File.join(dir1, 'file')
|
84
|
+
FileUtils.touch(File.join(dir2, 'zone.tab'))
|
85
|
+
FileUtils.touch(File.join(dir3, 'iso3166.tab'))
|
86
|
+
FileUtils.touch(File.join(dir4, 'zone.tab'))
|
87
|
+
FileUtils.touch(File.join(dir4, 'iso3166.tab'))
|
88
|
+
|
89
|
+
ZoneinfoDataSource.search_path = [file, dir2, dir3, dir4]
|
90
|
+
|
91
|
+
data_source = ZoneinfoDataSource.new
|
92
|
+
assert_equal(dir4, data_source.zoneinfo_dir)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_new_search_not_found
|
100
|
+
Dir.mktmpdir('tzinfo_test_dir1') do |dir1|
|
101
|
+
Dir.mktmpdir('tzinfo_test_dir2') do |dir2|
|
102
|
+
Dir.mktmpdir('tzinfo_test_dir3') do |dir3|
|
103
|
+
Dir.mktmpdir('tzinfo_test_dir4') do |dir4|
|
104
|
+
file = File.join(dir1, 'file')
|
105
|
+
FileUtils.touch(file)
|
106
|
+
FileUtils.touch(File.join(dir2, 'zone.tab'))
|
107
|
+
FileUtils.touch(File.join(dir3, 'iso3166.tab'))
|
108
|
+
|
109
|
+
ZoneinfoDataSource.search_path = [file, dir2, dir3, dir4]
|
110
|
+
|
111
|
+
assert_raises(ZoneinfoDirectoryNotFound) do
|
112
|
+
ZoneinfoDataSource.new
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_new_search_relative
|
121
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
122
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
123
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
124
|
+
|
125
|
+
FileUtils.chdir(dir)
|
126
|
+
|
127
|
+
ZoneinfoDataSource.search_path = ['.']
|
128
|
+
data_source = ZoneinfoDataSource.new
|
129
|
+
assert_equal(Pathname.new(dir).realpath, Pathname.new(dir).realpath)
|
130
|
+
|
131
|
+
# Change out of the directory to allow it to be deleted on Windows.
|
132
|
+
FileUtils.chdir(@orig_pwd)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_new_dir
|
137
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
138
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
139
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
140
|
+
|
141
|
+
data_source = ZoneinfoDataSource.new(dir)
|
142
|
+
assert_equal(dir, data_source.zoneinfo_dir)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def test_new_dir_invalid
|
147
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
148
|
+
assert_raises(InvalidZoneinfoDirectory) do
|
149
|
+
ZoneinfoDataSource.new(dir)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def test_new_file
|
155
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
156
|
+
file = File.join(dir, 'file')
|
157
|
+
FileUtils.touch(file)
|
158
|
+
|
159
|
+
assert_raises(InvalidZoneinfoDirectory) do
|
160
|
+
ZoneinfoDataSource.new(file)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
def test_new_dir_relative
|
166
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
167
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
168
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
169
|
+
|
170
|
+
FileUtils.chdir(dir)
|
171
|
+
|
172
|
+
data_source = ZoneinfoDataSource.new('.')
|
173
|
+
assert_equal(Pathname.new(dir).realpath, Pathname.new(dir).realpath)
|
174
|
+
|
175
|
+
# Change out of the directory to allow it to be deleted on Windows.
|
176
|
+
FileUtils.chdir(@orig_pwd)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
def test_zoneinfo_dir
|
181
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
182
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
183
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
184
|
+
|
185
|
+
data_source = ZoneinfoDataSource.new(dir)
|
186
|
+
assert_equal(dir, data_source.zoneinfo_dir)
|
187
|
+
assert_equal(true, data_source.zoneinfo_dir.frozen?)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
def test_load_timezone_info_data
|
192
|
+
info = @data_source.load_timezone_info('Europe/London')
|
193
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
194
|
+
assert_equal('Europe/London', info.identifier)
|
195
|
+
end
|
196
|
+
|
197
|
+
def test_load_timezone_info_linked
|
198
|
+
info = @data_source.load_timezone_info('UTC')
|
199
|
+
|
200
|
+
# On platforms that don't support symlinks, 'UTC' will be created as a copy.
|
201
|
+
# Either way, a ZoneinfoTimezoneInfo should be returned.
|
202
|
+
|
203
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
204
|
+
assert_equal('UTC', info.identifier)
|
205
|
+
end
|
206
|
+
|
207
|
+
def test_load_timezone_info_does_not_exist
|
208
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
209
|
+
@data_source.load_timezone_info('Nowhere/Special')
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_load_timezone_info_invalid
|
214
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
215
|
+
@data_source.load_timezone_info('../Definitions/Europe/London')
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
def test_load_timezone_info_nil
|
220
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
221
|
+
@data_source.load_timezone_info(nil)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
def test_load_timezone_info_case
|
226
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
227
|
+
@data_source.load_timezone_info('europe/london')
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
def test_load_timezone_info_permission_denied
|
232
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
233
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
234
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
235
|
+
|
236
|
+
file = File.join(dir, 'UTC')
|
237
|
+
FileUtils.touch(file)
|
238
|
+
FileUtils.chmod(0200, file)
|
239
|
+
|
240
|
+
data_source = ZoneinfoDataSource.new(dir)
|
241
|
+
|
242
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
243
|
+
data_source.load_timezone_info('UTC')
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
def test_load_timezone_info_directory
|
249
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
250
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
251
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
252
|
+
|
253
|
+
subdir = File.join(dir, 'Subdir')
|
254
|
+
FileUtils.mkdir(subdir)
|
255
|
+
|
256
|
+
data_source = ZoneinfoDataSource.new(dir)
|
257
|
+
|
258
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
259
|
+
data_source.load_timezone_info('Subdir')
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
def test_load_timezone_info_linked_absolute_outside
|
265
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
266
|
+
Dir.mktmpdir('tzinfo_test') do |outside|
|
267
|
+
outside_file = File.join(outside, 'EST')
|
268
|
+
FileUtils.cp(File.join(@data_source.zoneinfo_dir, 'EST'), outside_file)
|
269
|
+
|
270
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
271
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
272
|
+
|
273
|
+
file = File.join(dir, 'EST')
|
274
|
+
|
275
|
+
begin
|
276
|
+
FileUtils.ln_s(outside_file, file)
|
277
|
+
rescue NotImplementedError
|
278
|
+
# Symlinks not supported on this platform - skip test
|
279
|
+
return
|
280
|
+
end
|
281
|
+
|
282
|
+
data_source = ZoneinfoDataSource.new(dir)
|
283
|
+
|
284
|
+
info = data_source.load_timezone_info('EST')
|
285
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
286
|
+
assert_equal('EST', info.identifier)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
def test_load_timezone_info_linked_absolute_inside
|
292
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
293
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
294
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
295
|
+
|
296
|
+
FileUtils.cp(File.join(@data_source.zoneinfo_dir, 'EST'), File.join(dir, 'EST'))
|
297
|
+
|
298
|
+
link = File.join(dir, 'Link')
|
299
|
+
|
300
|
+
begin
|
301
|
+
FileUtils.ln_s(File.join(File.expand_path(dir), 'EST'), link)
|
302
|
+
rescue NotImplementedError
|
303
|
+
# Symlinks not supported on this platform - skip test
|
304
|
+
return
|
305
|
+
end
|
306
|
+
|
307
|
+
data_source = ZoneinfoDataSource.new(dir)
|
308
|
+
|
309
|
+
info = data_source.load_timezone_info('Link')
|
310
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
311
|
+
assert_equal('Link', info.identifier)
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
def test_load_timezone_info_linked_relative_outside
|
316
|
+
Dir.mktmpdir('tzinfo_test') do |root|
|
317
|
+
FileUtils.cp(File.join(@data_source.zoneinfo_dir, 'EST'), File.join(root, 'outside'))
|
318
|
+
|
319
|
+
dir = File.join(root, 'zoneinfo')
|
320
|
+
FileUtils.mkdir(dir)
|
321
|
+
|
322
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
323
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
324
|
+
|
325
|
+
link = File.join(dir, 'Link')
|
326
|
+
|
327
|
+
begin
|
328
|
+
FileUtils.ln_s('../outside', link)
|
329
|
+
rescue NotImplementedError
|
330
|
+
# Symlinks not supported on this platform - skip test
|
331
|
+
return
|
332
|
+
end
|
333
|
+
|
334
|
+
subdir = File.join(dir, 'Subdir')
|
335
|
+
subdir_link = File.join(subdir, 'Link')
|
336
|
+
FileUtils.mkdir(subdir)
|
337
|
+
FileUtils.ln_s('../../outside', subdir_link)
|
338
|
+
|
339
|
+
data_source = ZoneinfoDataSource.new(dir)
|
340
|
+
|
341
|
+
info = data_source.load_timezone_info('Link')
|
342
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
343
|
+
assert_equal('Link', info.identifier)
|
344
|
+
|
345
|
+
info = data_source.load_timezone_info('Subdir/Link')
|
346
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
347
|
+
assert_equal('Subdir/Link', info.identifier)
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
def test_load_timezone_info_linked_relative_parent_inside
|
352
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
353
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
354
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
355
|
+
|
356
|
+
FileUtils.cp(File.join(@data_source.zoneinfo_dir, 'EST'), File.join(dir, 'EST'))
|
357
|
+
|
358
|
+
subdir = File.join(dir, 'Subdir')
|
359
|
+
FileUtils.mkdir(subdir)
|
360
|
+
FileUtils.cp(File.join(@data_source.zoneinfo_dir, 'EST'), File.join(subdir, 'EST'))
|
361
|
+
|
362
|
+
subdir_link = File.join(subdir, 'Link')
|
363
|
+
begin
|
364
|
+
FileUtils.ln_s('../Subdir/EST', subdir_link)
|
365
|
+
rescue NotImplementedError
|
366
|
+
# Symlinks not supported on this platform - skip test
|
367
|
+
return
|
368
|
+
end
|
369
|
+
|
370
|
+
subdir_link2 = File.join(subdir, 'Link2')
|
371
|
+
FileUtils.ln_s('../EST', subdir_link2)
|
372
|
+
|
373
|
+
subdir2 = File.join(dir, 'Subdir2')
|
374
|
+
FileUtils.mkdir(subdir2)
|
375
|
+
subdir2_link = File.join(subdir2, 'Link')
|
376
|
+
FileUtils.ln_s('../Subdir/EST', subdir2_link)
|
377
|
+
|
378
|
+
data_source = ZoneinfoDataSource.new(dir)
|
379
|
+
|
380
|
+
info = data_source.load_timezone_info('Subdir/Link')
|
381
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
382
|
+
assert_equal('Subdir/Link', info.identifier)
|
383
|
+
|
384
|
+
info = data_source.load_timezone_info('Subdir/Link2')
|
385
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
386
|
+
assert_equal('Subdir/Link2', info.identifier)
|
387
|
+
|
388
|
+
info = data_source.load_timezone_info('Subdir2/Link')
|
389
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
390
|
+
assert_equal('Subdir2/Link', info.identifier)
|
391
|
+
end
|
392
|
+
end
|
393
|
+
|
394
|
+
def test_load_timezone_info_invalid_file
|
395
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
396
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
397
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
398
|
+
|
399
|
+
File.open(File.join(dir, 'Zone'), 'wb') do |file|
|
400
|
+
file.write('NotAValidTZifFile')
|
401
|
+
end
|
402
|
+
|
403
|
+
data_source = ZoneinfoDataSource.new(dir)
|
404
|
+
|
405
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
406
|
+
data_source.load_timezone_info('Zone')
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
def test_load_timezone_info_invalid_file_2
|
412
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
413
|
+
FileUtils.touch(File.join(dir, 'zone.tab'))
|
414
|
+
FileUtils.touch(File.join(dir, 'iso3166.tab'))
|
415
|
+
|
416
|
+
zone = File.join(dir, 'Zone')
|
417
|
+
|
418
|
+
File.open(File.join(@data_source.zoneinfo_dir, 'EST')) do |src|
|
419
|
+
# Change format to 3 (which is not a valid format).
|
420
|
+
File.open(zone, 'wb') do |dest|
|
421
|
+
dest.write('TZif3')
|
422
|
+
src.pos = 5
|
423
|
+
FileUtils.copy_stream(src, dest)
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
data_source = ZoneinfoDataSource.new(dir)
|
428
|
+
|
429
|
+
assert_raises(InvalidTimezoneIdentifier) do
|
430
|
+
data_source.load_timezone_info('Zone')
|
431
|
+
end
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
def test_load_timezone_info_tainted
|
436
|
+
safe_test do
|
437
|
+
info = @data_source.load_timezone_info('Europe/Amsterdam'.taint)
|
438
|
+
assert_equal('Europe/Amsterdam', info.identifier)
|
439
|
+
end
|
440
|
+
end
|
441
|
+
|
442
|
+
def test_load_timezone_info_tainted_zoneinfo_dir_safe_mode
|
443
|
+
safe_test do
|
444
|
+
assert_raises(SecurityError) do
|
445
|
+
ZoneinfoDataSource.new(@data_source.zoneinfo_dir.dup.taint)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
450
|
+
def test_load_timezone_info_tainted_zoneinfo_dir
|
451
|
+
data_source = ZoneinfoDataSource.new(@data_source.zoneinfo_dir.dup.taint)
|
452
|
+
info = data_source.load_timezone_info('Europe/London')
|
453
|
+
assert_kind_of(ZoneinfoTimezoneInfo, info)
|
454
|
+
assert_equal('Europe/London', info.identifier)
|
455
|
+
end
|
456
|
+
|
457
|
+
def get_timezone_filenames(directory)
|
458
|
+
entries = Dir.glob(File.join(directory, '**', '*'))
|
459
|
+
|
460
|
+
prefix = File.expand_path(directory) + File::SEPARATOR
|
461
|
+
|
462
|
+
entries = entries.select do |file|
|
463
|
+
if !file.include?('.')
|
464
|
+
file.untaint
|
465
|
+
File.file?(file)
|
466
|
+
else
|
467
|
+
false
|
468
|
+
end
|
469
|
+
end
|
470
|
+
|
471
|
+
entries = entries.collect {|file| file[directory.length + File::SEPARATOR.length, file.length - directory.length - File::SEPARATOR.length]}
|
472
|
+
|
473
|
+
# Exclude right (with leapseconds) and posix (copy) directories, localtime and posixrules
|
474
|
+
entries = entries.select do |file|
|
475
|
+
file !~ /\A(posix|right)\// &&
|
476
|
+
file !~ /(\A|\/)\.svn\// &&
|
477
|
+
!%w(localtime posixrules Factory).include?(file)
|
478
|
+
end
|
479
|
+
|
480
|
+
entries.sort
|
481
|
+
end
|
482
|
+
|
483
|
+
def test_timezone_identifiers
|
484
|
+
expected = get_timezone_filenames(@data_source.zoneinfo_dir)
|
485
|
+
all = @data_source.timezone_identifiers
|
486
|
+
assert_kind_of(Array, all)
|
487
|
+
assert_array_same_items(expected, all)
|
488
|
+
assert_equal(true, all.frozen?)
|
489
|
+
end
|
490
|
+
|
491
|
+
def test_data_timezone_identifiers
|
492
|
+
expected = get_timezone_filenames(@data_source.zoneinfo_dir)
|
493
|
+
all_data = @data_source.data_timezone_identifiers
|
494
|
+
assert_kind_of(Array, all_data)
|
495
|
+
assert_array_same_items(expected, all_data)
|
496
|
+
assert_equal(true, all_data.frozen?)
|
497
|
+
end
|
498
|
+
|
499
|
+
def test_linked_timezone_identifiers
|
500
|
+
all_linked = @data_source.linked_timezone_identifiers
|
501
|
+
assert_kind_of(Array, all_linked)
|
502
|
+
assert_equal(true, all_linked.empty?)
|
503
|
+
assert_equal(true, all_linked.frozen?)
|
504
|
+
end
|
505
|
+
|
506
|
+
def test_timezone_identifiers_safe_mode
|
507
|
+
safe_test do
|
508
|
+
expected = get_timezone_filenames(@data_source.zoneinfo_dir)
|
509
|
+
all = @data_source.timezone_identifiers
|
510
|
+
assert_kind_of(Array, all)
|
511
|
+
assert_array_same_items(expected, all)
|
512
|
+
assert_equal(true, all.frozen?)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
def test_load_country_info
|
517
|
+
info = @data_source.load_country_info('GB')
|
518
|
+
assert_equal('GB', info.code)
|
519
|
+
end
|
520
|
+
|
521
|
+
def test_load_country_info_not_exist
|
522
|
+
assert_raises(InvalidCountryCode) do
|
523
|
+
@data_source.load_country_info('ZZ')
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
def test_load_country_info_invalid
|
528
|
+
assert_raises(InvalidCountryCode) do
|
529
|
+
@data_source.load_country_info('../Countries/GB')
|
530
|
+
end
|
531
|
+
end
|
532
|
+
|
533
|
+
def test_load_country_info_nil
|
534
|
+
assert_raises(InvalidCountryCode) do
|
535
|
+
@data_source.load_country_info(nil)
|
536
|
+
end
|
537
|
+
end
|
538
|
+
|
539
|
+
def test_load_country_info_case
|
540
|
+
assert_raises(InvalidCountryCode) do
|
541
|
+
@data_source.load_country_info('gb')
|
542
|
+
end
|
543
|
+
end
|
544
|
+
|
545
|
+
def test_load_country_info_tainted
|
546
|
+
safe_test do
|
547
|
+
info = @data_source.load_country_info('NL'.taint)
|
548
|
+
assert_equal('NL', info.code)
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
def test_load_country_info_check_zones
|
553
|
+
Dir.mktmpdir('tzinfo_test') do |dir|
|
554
|
+
File.open(File.join(dir, 'iso3166.tab'), 'w') do |iso3166|
|
555
|
+
iso3166.puts("FC\tFake Country")
|
556
|
+
iso3166.puts("OC\tOther Country")
|
557
|
+
end
|
558
|
+
|
559
|
+
File.open(File.join(dir, 'zone.tab'), 'w') do |zone|
|
560
|
+
zone.puts("FC\t+513030-0000731\tFake/One\tDescription of one")
|
561
|
+
zone.puts("FC\t+353916+1394441\tFake/Two\tAnother description")
|
562
|
+
zone.puts("FC\t-2332-04637\tFake/Three\tThis is Three")
|
563
|
+
zone.puts("OC\t+5005+01426\tOther/One")
|
564
|
+
end
|
565
|
+
|
566
|
+
data_source = ZoneinfoDataSource.new(dir)
|
567
|
+
|
568
|
+
info = data_source.load_country_info('FC')
|
569
|
+
assert_equal('FC', info.code)
|
570
|
+
assert_equal(['Fake/One', 'Fake/Two', 'Fake/Three'], info.zone_identifiers)
|
571
|
+
assert_equal(true, info.zone_identifiers.frozen?)
|
572
|
+
assert_equal([
|
573
|
+
CountryTimezone.new('Fake/One', 6181, 120, -451, 3600, 'Description of one'),
|
574
|
+
CountryTimezone.new('Fake/Two', 32089, 900, 503081, 3600, 'Another description'),
|
575
|
+
CountryTimezone.new('Fake/Three', -353, 15, -2797, 60, 'This is Three')], info.zones)
|
576
|
+
assert_equal(true, info.zones.frozen?)
|
577
|
+
|
578
|
+
info = data_source.load_country_info('OC')
|
579
|
+
assert_equal('OC', info.code)
|
580
|
+
assert_equal(['Other/One'], info.zone_identifiers)
|
581
|
+
assert_equal(true, info.zone_identifiers.frozen?)
|
582
|
+
assert_equal([CountryTimezone.new('Other/One', 601, 12, 433, 30)], info.zones)
|
583
|
+
assert_equal(true, info.zones.frozen?)
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
def test_country_codes
|
588
|
+
file_codes = []
|
589
|
+
|
590
|
+
File.open(File.join(@data_source.zoneinfo_dir, 'iso3166.tab')) do |file|
|
591
|
+
file.each_line do |line|
|
592
|
+
line.chomp!
|
593
|
+
file_codes << $1 if line =~ /\A([A-Z]{2})\t/
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
codes = @data_source.country_codes
|
598
|
+
assert_array_same_items(file_codes, codes)
|
599
|
+
assert_equal(true, codes.frozen?)
|
600
|
+
end
|
601
|
+
end
|