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
data/test/tc_timezone.rb
CHANGED
@@ -1,8 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2005-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')
|
6
24
|
|
7
25
|
include TZInfo
|
8
26
|
|
@@ -45,10 +63,13 @@ class TCTimezone < Test::Unit::TestCase
|
|
45
63
|
|
46
64
|
def setup
|
47
65
|
@orig_default_dst = Timezone.default_dst
|
66
|
+
@orig_data_source = DataSource.get
|
67
|
+
Timezone.send :class_variable_set, :@@loaded_zones, {}
|
48
68
|
end
|
49
69
|
|
50
70
|
def teardown
|
51
71
|
Timezone.default_dst = @orig_default_dst
|
72
|
+
DataSource.set(@orig_data_source)
|
52
73
|
end
|
53
74
|
|
54
75
|
def test_default_dst_initial_value
|
@@ -76,7 +97,13 @@ class TCTimezone < Test::Unit::TestCase
|
|
76
97
|
def test_get_valid_2
|
77
98
|
tz = Timezone.get('UTC')
|
78
99
|
|
79
|
-
|
100
|
+
# ZoneinfoDataSource doesn't return LinkedTimezoneInfo for any timezone.
|
101
|
+
if DataSource.get.load_timezone_info('UTC').kind_of?(LinkedTimezoneInfo)
|
102
|
+
assert_kind_of(LinkedTimezone, tz)
|
103
|
+
else
|
104
|
+
assert_kind_of(DataTimezone, tz)
|
105
|
+
end
|
106
|
+
|
80
107
|
assert_equal('UTC', tz.identifier)
|
81
108
|
end
|
82
109
|
|
@@ -98,29 +125,13 @@ class TCTimezone < Test::Unit::TestCase
|
|
98
125
|
end
|
99
126
|
|
100
127
|
def test_get_invalid
|
101
|
-
assert_raises(InvalidTimezoneIdentifier) { Timezone.get('../
|
102
|
-
end
|
103
|
-
|
104
|
-
def test_get_directory_traversal
|
105
|
-
assert_raises(InvalidTimezoneIdentifier) { Timezone.get("foo\n/../../../payload") }
|
128
|
+
assert_raises(InvalidTimezoneIdentifier) { Timezone.get('../Definitions/UTC') }
|
106
129
|
end
|
107
130
|
|
108
131
|
def test_get_nil
|
109
132
|
assert_raises(InvalidTimezoneIdentifier) { Timezone.get(nil) }
|
110
133
|
end
|
111
134
|
|
112
|
-
def test_get_plus
|
113
|
-
tz = Timezone.get('Etc/GMT+1')
|
114
|
-
|
115
|
-
assert_equal('Etc/GMT+1', tz.identifier)
|
116
|
-
end
|
117
|
-
|
118
|
-
def test_get_minus
|
119
|
-
tz = Timezone.get('Etc/GMT-1')
|
120
|
-
|
121
|
-
assert_equal('Etc/GMT-1', tz.identifier)
|
122
|
-
end
|
123
|
-
|
124
135
|
def test_get_case
|
125
136
|
Timezone.get('Europe/Prague')
|
126
137
|
assert_raises(InvalidTimezoneIdentifier) { Timezone.get('Europe/prague') }
|
@@ -153,15 +164,10 @@ class TCTimezone < Test::Unit::TestCase
|
|
153
164
|
end
|
154
165
|
end
|
155
166
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
def test_get_tainted_not_loaded
|
161
|
-
safe_test do
|
162
|
-
tz = Timezone.get('Europe/Amsterdam'.taint)
|
163
|
-
assert_equal('Europe/Amsterdam', tz.identifier)
|
164
|
-
end
|
167
|
+
def test_get_tainted_not_previously_loaded
|
168
|
+
safe_test do
|
169
|
+
tz = Timezone.get('Europe/Amsterdam'.taint)
|
170
|
+
assert_equal('Europe/Amsterdam', tz.identifier)
|
165
171
|
end
|
166
172
|
end
|
167
173
|
|
@@ -204,35 +210,35 @@ class TCTimezone < Test::Unit::TestCase
|
|
204
210
|
|
205
211
|
def test_all
|
206
212
|
all = Timezone.all
|
207
|
-
expected =
|
213
|
+
expected = DataSource.get.timezone_identifiers.collect {|identifier| Timezone.get_proxy(identifier)}
|
208
214
|
assert_equal(expected, all)
|
209
215
|
end
|
210
216
|
|
211
217
|
def test_all_identifiers
|
212
218
|
all = Timezone.all_identifiers
|
213
|
-
assert_equal(
|
219
|
+
assert_equal(DataSource.get.timezone_identifiers, all)
|
214
220
|
end
|
215
221
|
|
216
222
|
def test_all_data_zones
|
217
223
|
all_data = Timezone.all_data_zones
|
218
|
-
expected =
|
224
|
+
expected = DataSource.get.data_timezone_identifiers.collect {|identifier| Timezone.get_proxy(identifier)}
|
219
225
|
assert_equal(expected, all_data)
|
220
226
|
end
|
221
227
|
|
222
228
|
def test_all_data_zone_identifiers
|
223
229
|
all_data = Timezone.all_data_zone_identifiers
|
224
|
-
assert_equal(
|
230
|
+
assert_equal(DataSource.get.data_timezone_identifiers, all_data)
|
225
231
|
end
|
226
232
|
|
227
233
|
def test_all_linked_zones
|
228
234
|
all_linked = Timezone.all_linked_zones
|
229
|
-
expected =
|
235
|
+
expected = DataSource.get.linked_timezone_identifiers.collect {|identifier| Timezone.get_proxy(identifier)}
|
230
236
|
assert_equal(expected, all_linked)
|
231
237
|
end
|
232
238
|
|
233
239
|
def test_all_linked_zone_identifiers
|
234
240
|
all_linked = Timezone.all_linked_zone_identifiers
|
235
|
-
assert_equal(
|
241
|
+
assert_equal(DataSource.get.linked_timezone_identifiers, all_linked)
|
236
242
|
end
|
237
243
|
|
238
244
|
def test_all_country_zones
|
@@ -330,8 +336,10 @@ class TCTimezone < Test::Unit::TestCase
|
|
330
336
|
def test_period_for_local
|
331
337
|
dt = DateTime.new(2005,2,18,16,24,23)
|
332
338
|
dt2 = DateTime.new(2005,2,18,16,24,23).new_offset(Rational(5,24))
|
339
|
+
dt3 = DateTime.new(2005,2,18,16,24,23 + Rational(789, 1000))
|
333
340
|
t = Time.utc(2005,2,18,16,24,23)
|
334
341
|
t2 = Time.local(2005,2,18,16,24,23)
|
342
|
+
t3 = Time.utc(2005,2,18,16,24,23,789000)
|
335
343
|
ts = t.to_i
|
336
344
|
|
337
345
|
o1 = TimezoneOffsetInfo.new(0, 0, :GMT)
|
@@ -343,15 +351,18 @@ class TCTimezone < Test::Unit::TestCase
|
|
343
351
|
|
344
352
|
dt_period = TestTimezone.new('Europe/London', nil, [period], dt).period_for_local(dt)
|
345
353
|
dt2_period = TestTimezone.new('Europe/London', nil, [period], dt2).period_for_local(dt2)
|
354
|
+
dt3_period = TestTimezone.new('Europe/London', nil, [period], dt3).period_for_local(dt3)
|
346
355
|
t_period = TestTimezone.new('Europe/London', nil, [period], t).period_for_local(t)
|
347
356
|
t2_period = TestTimezone.new('Europe/London', nil, [period], t2).period_for_local(t2)
|
348
|
-
|
357
|
+
t3_period = TestTimezone.new('Europe/London', nil, [period], t3).period_for_local(t3)
|
358
|
+
ts_period = TestTimezone.new('Europe/London', nil, [period], ts).period_for_local(ts)
|
349
359
|
|
350
360
|
assert_equal(period, dt_period)
|
351
361
|
assert_equal(period, dt2_period)
|
352
362
|
assert_equal(period, t_period)
|
353
363
|
assert_equal(period, t2_period)
|
354
|
-
assert_equal(period,
|
364
|
+
assert_equal(period, t3_period)
|
365
|
+
assert_equal(period, ts_period)
|
355
366
|
end
|
356
367
|
|
357
368
|
def test_period_for_local_invalid
|
@@ -374,16 +385,22 @@ class TCTimezone < Test::Unit::TestCase
|
|
374
385
|
p1 = TimezonePeriod.new(t1, t2)
|
375
386
|
p2 = TimezonePeriod.new(t2, t3)
|
376
387
|
|
377
|
-
dt = DateTime.new(2004,10,31,1,
|
388
|
+
dt = DateTime.new(2004,10,31,1,0,0)
|
389
|
+
dt2 = DateTime.new(2004,10,31,1,0,Rational(555,1000))
|
378
390
|
t = Time.utc(2004,10,31,1,30,0)
|
391
|
+
t2 = Time.utc(2004,10,31,1,30,0,555000)
|
379
392
|
i = Time.utc(2004,10,31,1,59,59).to_i
|
380
393
|
|
381
394
|
dt_tz = TestTimezone.new('America/New_York', nil, [p1, p2], dt)
|
395
|
+
dt2_tz = TestTimezone.new('America/New_York', nil, [p1, p2], dt2)
|
382
396
|
t_tz = TestTimezone.new('America/New_York', nil, [p1, p2], t)
|
397
|
+
t2_tz = TestTimezone.new('America/New_York', nil, [p1, p2], t2)
|
383
398
|
i_tz = TestTimezone.new('America/New_York', nil, [p1, p2], i)
|
384
399
|
|
385
400
|
assert_raises(AmbiguousTime) { dt_tz.period_for_local(dt) }
|
401
|
+
assert_raises(AmbiguousTime) { dt2_tz.period_for_local(dt2) }
|
386
402
|
assert_raises(AmbiguousTime) { t_tz.period_for_local(t) }
|
403
|
+
assert_raises(AmbiguousTime) { t2_tz.period_for_local(t2) }
|
387
404
|
assert_raises(AmbiguousTime) { i_tz.period_for_local(i) }
|
388
405
|
end
|
389
406
|
|
@@ -399,15 +416,21 @@ class TCTimezone < Test::Unit::TestCase
|
|
399
416
|
p2 = TimezonePeriod.new(t2, t3)
|
400
417
|
|
401
418
|
dt = DateTime.new(2004,4,4,2,0,0)
|
419
|
+
dt2 = DateTime.new(2004,4,4,2,0,Rational(987,1000))
|
402
420
|
t = Time.utc(2004,4,4,2,30,0)
|
421
|
+
t2 = Time.utc(2004,4,4,2,30,0,987000)
|
403
422
|
i = Time.utc(2004,4,4,2,59,59).to_i
|
404
423
|
|
405
424
|
dt_tz = TestTimezone.new('America/New_York', nil, [], dt)
|
425
|
+
dt2_tz = TestTimezone.new('America/New_York', nil, [], dt2)
|
406
426
|
t_tz = TestTimezone.new('America/New_York', nil, [], t)
|
407
|
-
|
427
|
+
t2_tz = TestTimezone.new('America/New_York', nil, [], t2)
|
428
|
+
i_tz = TestTimezone.new('America/New_York', nil, [], i)
|
408
429
|
|
409
430
|
assert_raises(PeriodNotFound) { dt_tz.period_for_local(dt) }
|
431
|
+
assert_raises(PeriodNotFound) { dt2_tz.period_for_local(dt2) }
|
410
432
|
assert_raises(PeriodNotFound) { t_tz.period_for_local(t) }
|
433
|
+
assert_raises(PeriodNotFound) { t2_tz.period_for_local(t2) }
|
411
434
|
assert_raises(PeriodNotFound) { i_tz.period_for_local(i) }
|
412
435
|
end
|
413
436
|
|
@@ -579,8 +602,12 @@ class TCTimezone < Test::Unit::TestCase
|
|
579
602
|
def test_utc_to_local
|
580
603
|
dt = DateTime.new(2005,6,18,16,24,23)
|
581
604
|
dt2 = DateTime.new(2005,6,18,16,24,23).new_offset(Rational(5,24))
|
605
|
+
dtu = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000))
|
606
|
+
dtu2 = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000)).new_offset(Rational(5,24))
|
582
607
|
t = Time.utc(2005,6,18,16,24,23)
|
583
608
|
t2 = Time.local(2005,6,18,16,24,23)
|
609
|
+
tu = Time.utc(2005,6,18,16,24,23,567000)
|
610
|
+
tu2 = Time.local(2005,6,18,16,24,23,567000)
|
584
611
|
ts = t.to_i
|
585
612
|
|
586
613
|
o1 = TimezoneOffsetInfo.new(0, 0, :GMT)
|
@@ -590,18 +617,26 @@ class TCTimezone < Test::Unit::TestCase
|
|
590
617
|
TimezoneTransitionInfo.new(o2, o1, 1111885200),
|
591
618
|
TimezoneTransitionInfo.new(o1, o2, 1130634000))
|
592
619
|
|
593
|
-
assert_equal(DateTime.new(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], dt).utc_to_local(dt))
|
594
|
-
assert_equal(DateTime.new(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], dt2).utc_to_local(dt2))
|
620
|
+
assert_equal(DateTime.new(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], dt).utc_to_local(dt))
|
621
|
+
assert_equal(DateTime.new(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], dt2).utc_to_local(dt2))
|
622
|
+
assert_equal(DateTime.new(2005,6,18,17,24,23 + Rational(567,1000)), TestTimezone.new('Europe/London', period, [], dtu).utc_to_local(dtu))
|
623
|
+
assert_equal(DateTime.new(2005,6,18,17,24,23 + Rational(567,1000)), TestTimezone.new('Europe/London', period, [], dtu2).utc_to_local(dtu2))
|
595
624
|
assert_equal(Time.utc(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], t).utc_to_local(t))
|
596
625
|
assert_equal(Time.utc(2005,6,18,17,24,23), TestTimezone.new('Europe/London', period, [], t2).utc_to_local(t2))
|
626
|
+
assert_equal(Time.utc(2005,6,18,17,24,23,567000), TestTimezone.new('Europe/London', period, [], tu).utc_to_local(tu))
|
627
|
+
assert_equal(Time.utc(2005,6,18,17,24,23,567000), TestTimezone.new('Europe/London', period, [], tu2).utc_to_local(tu2))
|
597
628
|
assert_equal(Time.utc(2005,6,18,17,24,23).to_i, TestTimezone.new('Europe/London', period, [], ts).utc_to_local(ts))
|
598
629
|
end
|
599
630
|
|
600
631
|
def test_utc_to_local_offset
|
601
632
|
dt = DateTime.new(2005,6,18,16,24,23)
|
602
633
|
dt2 = DateTime.new(2005,6,18,16,24,23).new_offset(Rational(5,24))
|
634
|
+
dtu = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000))
|
635
|
+
dtu2 = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000)).new_offset(Rational(5,24))
|
603
636
|
t = Time.utc(2005,6,18,16,24,23)
|
604
637
|
t2 = Time.local(2005,6,18,16,24,23)
|
638
|
+
tu = Time.utc(2005,6,18,16,24,23,567000)
|
639
|
+
tu2 = Time.local(2005,6,18,16,24,23,567000)
|
605
640
|
|
606
641
|
o1 = TimezoneOffsetInfo.new(0, 0, :GMT)
|
607
642
|
o2 = TimezoneOffsetInfo.new(0, 3600, :BST)
|
@@ -612,17 +647,27 @@ class TCTimezone < Test::Unit::TestCase
|
|
612
647
|
|
613
648
|
assert_equal(0, TestTimezone.new('Europe/London', period, [], dt).utc_to_local(dt).offset)
|
614
649
|
assert_equal(0, TestTimezone.new('Europe/London', period, [], dt2).utc_to_local(dt2).offset)
|
650
|
+
assert_equal(0, TestTimezone.new('Europe/London', period, [], dtu).utc_to_local(dtu).offset)
|
651
|
+
assert_equal(0, TestTimezone.new('Europe/London', period, [], dtu2).utc_to_local(dtu2).offset)
|
615
652
|
assert_equal(0, TestTimezone.new('Europe/London', period, [], t).utc_to_local(t).utc_offset)
|
616
653
|
assert_equal('UTC', TestTimezone.new('Europe/London', period, [], t).utc_to_local(t).zone)
|
617
654
|
assert_equal(0, TestTimezone.new('Europe/London', period, [], t2).utc_to_local(t2).utc_offset)
|
618
655
|
assert_equal('UTC', TestTimezone.new('Europe/London', period, [], t2).utc_to_local(t2).zone)
|
656
|
+
assert_equal(0, TestTimezone.new('Europe/London', period, [], tu).utc_to_local(tu).utc_offset)
|
657
|
+
assert_equal('UTC', TestTimezone.new('Europe/London', period, [], tu).utc_to_local(tu).zone)
|
658
|
+
assert_equal(0, TestTimezone.new('Europe/London', period, [], tu2).utc_to_local(tu2).utc_offset)
|
659
|
+
assert_equal('UTC', TestTimezone.new('Europe/London', period, [], tu2).utc_to_local(tu2).zone)
|
619
660
|
end
|
620
661
|
|
621
662
|
def test_local_to_utc
|
622
663
|
dt = DateTime.new(2005,6,18,16,24,23)
|
623
|
-
dt2 = DateTime.new(2005,6,18,16,24,23)
|
664
|
+
dt2 = DateTime.new(2005,6,18,16,24,23).new_offset(Rational(5, 24))
|
665
|
+
dtu = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000))
|
666
|
+
dtu2 = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000)).new_offset(Rational(5, 24))
|
624
667
|
t = Time.utc(2005,6,18,16,24,23)
|
625
668
|
t2 = Time.local(2005,6,18,16,24,23)
|
669
|
+
tu = Time.utc(2005,6,18,16,24,23,567000)
|
670
|
+
tu2 = Time.local(2005,6,18,16,24,23,567000)
|
626
671
|
ts = t.to_i
|
627
672
|
|
628
673
|
o1 = TimezoneOffsetInfo.new(0, 0, :GMT)
|
@@ -633,17 +678,25 @@ class TCTimezone < Test::Unit::TestCase
|
|
633
678
|
TimezoneTransitionInfo.new(o1, o2, 1130634000))
|
634
679
|
|
635
680
|
assert_equal(DateTime.new(2005,6,18,15,24,23), TestTimezone.new('Europe/London', nil, [period], dt).local_to_utc(dt))
|
636
|
-
assert_equal(DateTime.new(2005,6,18,15,24,23), TestTimezone.new('Europe/London', nil, [period], dt2).local_to_utc(dt2))
|
681
|
+
assert_equal(DateTime.new(2005,6,18,15,24,23), TestTimezone.new('Europe/London', nil, [period], dt2).local_to_utc(dt2))
|
682
|
+
assert_equal(DateTime.new(2005,6,18,15,24,23 + Rational(567,1000)), TestTimezone.new('Europe/London', nil, [period], dtu).local_to_utc(dtu))
|
683
|
+
assert_equal(DateTime.new(2005,6,18,15,24,23 + Rational(567,1000)), TestTimezone.new('Europe/London', nil, [period], dtu2).local_to_utc(dtu2))
|
637
684
|
assert_equal(Time.utc(2005,6,18,15,24,23), TestTimezone.new('Europe/London', nil, [period], t).local_to_utc(t))
|
638
685
|
assert_equal(Time.utc(2005,6,18,15,24,23), TestTimezone.new('Europe/London', nil, [period], t2).local_to_utc(t2))
|
686
|
+
assert_equal(Time.utc(2005,6,18,15,24,23,567000), TestTimezone.new('Europe/London', nil, [period], tu).local_to_utc(tu))
|
687
|
+
assert_equal(Time.utc(2005,6,18,15,24,23,567000), TestTimezone.new('Europe/London', nil, [period], tu2).local_to_utc(tu2))
|
639
688
|
assert_equal(Time.utc(2005,6,18,15,24,23).to_i, TestTimezone.new('Europe/London', nil, [period], ts).local_to_utc(ts))
|
640
689
|
end
|
641
690
|
|
642
691
|
def test_local_to_utc_offset
|
643
692
|
dt = DateTime.new(2005,6,18,16,24,23)
|
644
|
-
dt2 = DateTime.new(2005,6,18,16,24,23).new_offset(Rational(5,24))
|
693
|
+
dt2 = DateTime.new(2005,6,18,16,24,23).new_offset(Rational(5, 24))
|
694
|
+
dtu = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000))
|
695
|
+
dtu2 = DateTime.new(2005,6,18,16,24,23 + Rational(567,1000)).new_offset(Rational(5, 24))
|
645
696
|
t = Time.utc(2005,6,18,16,24,23)
|
646
697
|
t2 = Time.local(2005,6,18,16,24,23)
|
698
|
+
tu = Time.utc(2005,6,18,16,24,23,567000)
|
699
|
+
tu2 = Time.local(2005,6,18,16,24,23,567000)
|
647
700
|
|
648
701
|
o1 = TimezoneOffsetInfo.new(0, 0, :GMT)
|
649
702
|
o2 = TimezoneOffsetInfo.new(0, 3600, :BST)
|
@@ -654,10 +707,16 @@ class TCTimezone < Test::Unit::TestCase
|
|
654
707
|
|
655
708
|
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], dt).local_to_utc(dt).offset)
|
656
709
|
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], dt2).local_to_utc(dt2).offset)
|
710
|
+
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], dtu).local_to_utc(dtu).offset)
|
711
|
+
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], dtu2).local_to_utc(dtu2).offset)
|
657
712
|
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], t).local_to_utc(t).utc_offset)
|
658
713
|
assert_equal('UTC', TestTimezone.new('Europe/London', nil, [period], t).local_to_utc(t).zone)
|
659
714
|
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], t2).local_to_utc(t2).utc_offset)
|
660
715
|
assert_equal('UTC', TestTimezone.new('Europe/London', nil, [period], t2).local_to_utc(t2).zone)
|
716
|
+
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], tu).local_to_utc(tu).utc_offset)
|
717
|
+
assert_equal('UTC', TestTimezone.new('Europe/London', nil, [period], tu).local_to_utc(tu).zone)
|
718
|
+
assert_equal(0, TestTimezone.new('Europe/London', nil, [period], tu2).local_to_utc(tu2).utc_offset)
|
719
|
+
assert_equal('UTC', TestTimezone.new('Europe/London', nil, [period], tu2).local_to_utc(tu2).zone)
|
661
720
|
end
|
662
721
|
|
663
722
|
def test_local_to_utc_invalid
|
@@ -695,7 +754,11 @@ class TCTimezone < Test::Unit::TestCase
|
|
695
754
|
|
696
755
|
i = Time.utc(2004,10,31,1,30,0).to_i
|
697
756
|
tz = TestTimezone.new('America/New_York', nil, [p1, p2], i)
|
698
|
-
assert_raises(AmbiguousTime) { tz.local_to_utc(i) }
|
757
|
+
assert_raises(AmbiguousTime) { tz.local_to_utc(i) }
|
758
|
+
|
759
|
+
f = Time.utc(2004,10,31,1,30,0,501).to_i
|
760
|
+
tz = TestTimezone.new('America/New_York', nil, [p1, p2], f)
|
761
|
+
assert_raises(AmbiguousTime) { tz.local_to_utc(f) }
|
699
762
|
end
|
700
763
|
|
701
764
|
def test_local_to_utc_not_found
|
@@ -912,10 +975,6 @@ class TCTimezone < Test::Unit::TestCase
|
|
912
975
|
assert_equal(1, TestTimezone.new('Europe/Paris') <=> TestTimezone.new('America/New_York'))
|
913
976
|
end
|
914
977
|
|
915
|
-
def test_compare_non_comparable
|
916
|
-
assert_nil(TestTimezone.new('Europe/London') <=> Object.new)
|
917
|
-
end
|
918
|
-
|
919
978
|
def test_equality
|
920
979
|
assert_equal(true, TestTimezone.new('Europe/London') == TestTimezone.new('Europe/London'))
|
921
980
|
assert_equal(false, TestTimezone.new('Europe/London') == TestTimezone.new('Europe/london'))
|
@@ -943,16 +1002,23 @@ class TCTimezone < Test::Unit::TestCase
|
|
943
1002
|
|
944
1003
|
def test_marshal_linked
|
945
1004
|
tz = Timezone.get('UTC')
|
946
|
-
|
1005
|
+
|
1006
|
+
# ZoneinfoDataSource doesn't return LinkedTimezoneInfo for any timezone.
|
1007
|
+
if DataSource.get.load_timezone_info('UTC').kind_of?(LinkedTimezoneInfo)
|
1008
|
+
assert_kind_of(LinkedTimezone, tz)
|
1009
|
+
else
|
1010
|
+
assert_kind_of(DataTimezone, tz)
|
1011
|
+
end
|
1012
|
+
|
947
1013
|
assert_same(tz, Marshal.load(Marshal.dump(tz)))
|
948
1014
|
end
|
949
1015
|
|
950
1016
|
def test_strftime_datetime
|
951
1017
|
tz = Timezone.get('Europe/London')
|
952
|
-
assert_equal('23:12:02 BST', tz.strftime('%H:%M:%S %Z', DateTime.new(
|
953
|
-
assert_equal('BST', tz.strftime('%Z', DateTime.new(
|
954
|
-
assert_equal('%ZBST', tz.strftime('%%Z%Z', DateTime.new(
|
955
|
-
assert_equal('BST BST', tz.strftime('%Z %Z', DateTime.new(
|
1018
|
+
assert_equal('23:12:02 BST', tz.strftime('%H:%M:%S %Z', DateTime.new(2006, 7, 15, 22, 12, 2)))
|
1019
|
+
assert_equal('BST', tz.strftime('%Z', DateTime.new(2006, 7, 15, 22, 12, 2)))
|
1020
|
+
assert_equal('%ZBST', tz.strftime('%%Z%Z', DateTime.new(2006, 7, 15, 22, 12, 2)))
|
1021
|
+
assert_equal('BST BST', tz.strftime('%Z %Z', DateTime.new(2006, 7, 15, 22, 12, 2)))
|
956
1022
|
end
|
957
1023
|
|
958
1024
|
def test_strftime_time
|
@@ -970,4 +1036,68 @@ class TCTimezone < Test::Unit::TestCase
|
|
970
1036
|
assert_equal('%ZBST', tz.strftime('%%Z%Z', Time.utc(2006, 7, 15, 22, 12, 2).to_i))
|
971
1037
|
assert_equal('BST BST', tz.strftime('%Z %Z', Time.utc(2006, 7, 15, 22, 12, 2).to_i))
|
972
1038
|
end
|
1039
|
+
|
1040
|
+
def test_get_missing_data_source
|
1041
|
+
DataSource.set(DataSource.new)
|
1042
|
+
|
1043
|
+
assert_raises(InvalidDataSource) do
|
1044
|
+
Timezone.get('Europe/London')
|
1045
|
+
end
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
def test_new_missing_data_source
|
1049
|
+
DataSource.set(DataSource.new)
|
1050
|
+
|
1051
|
+
assert_raises(InvalidDataSource) do
|
1052
|
+
Timezone.new('Europe/London')
|
1053
|
+
end
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
def test_all_missing_data_source
|
1057
|
+
DataSource.set(DataSource.new)
|
1058
|
+
|
1059
|
+
assert_raises(InvalidDataSource) do
|
1060
|
+
Timezone.all
|
1061
|
+
end
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
def test_all_identifiers_missing_data_source
|
1065
|
+
DataSource.set(DataSource.new)
|
1066
|
+
|
1067
|
+
assert_raises(InvalidDataSource) do
|
1068
|
+
Timezone.all_identifiers
|
1069
|
+
end
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
def test_all_data_zones_missing_data_source
|
1073
|
+
DataSource.set(DataSource.new)
|
1074
|
+
|
1075
|
+
assert_raises(InvalidDataSource) do
|
1076
|
+
Timezone.all_data_zones
|
1077
|
+
end
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
def test_all_data_zone_identifiers_missing_data_source
|
1081
|
+
DataSource.set(DataSource.new)
|
1082
|
+
|
1083
|
+
assert_raises(InvalidDataSource) do
|
1084
|
+
Timezone.all_data_zone_identifiers
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
def test_all_linked_zones_missing_data_source
|
1089
|
+
DataSource.set(DataSource.new)
|
1090
|
+
|
1091
|
+
assert_raises(InvalidDataSource) do
|
1092
|
+
Timezone.all_linked_zones
|
1093
|
+
end
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
def test_all_linked_zone_identifiers_missing_data_source
|
1097
|
+
DataSource.set(DataSource.new)
|
1098
|
+
|
1099
|
+
assert_raises(InvalidDataSource) do
|
1100
|
+
Timezone.all_linked_zone_identifiers
|
1101
|
+
end
|
1102
|
+
end
|
973
1103
|
end
|
@@ -1,6 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2006-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')
|
4
24
|
|
5
25
|
include TZInfo
|
6
26
|
|
@@ -75,7 +95,7 @@ class TCTimezoneDefinition < Test::Unit::TestCase
|
|
75
95
|
end
|
76
96
|
|
77
97
|
def test_data
|
78
|
-
assert_kind_of(
|
98
|
+
assert_kind_of(TransitionDataTimezoneInfo, DataTest.get)
|
79
99
|
assert_equal('Test/Data/Zone', DataTest.get.identifier)
|
80
100
|
assert_equal(:LMT, DataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,14)).abbreviation)
|
81
101
|
assert_equal(:GMT, DataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,15)).abbreviation)
|
@@ -88,7 +108,7 @@ class TCTimezoneDefinition < Test::Unit::TestCase
|
|
88
108
|
end
|
89
109
|
|
90
110
|
def test_double_data
|
91
|
-
assert_kind_of(
|
111
|
+
assert_kind_of(TransitionDataTimezoneInfo, DoubleDataTest.get)
|
92
112
|
assert_equal('Test/Data/Zone2', DoubleDataTest.get.identifier)
|
93
113
|
assert_equal(:LMT, DoubleDataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,14)).abbreviation)
|
94
114
|
assert_equal(:GMT, DoubleDataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,15)).abbreviation)
|
@@ -107,7 +127,7 @@ class TCTimezoneDefinition < Test::Unit::TestCase
|
|
107
127
|
end
|
108
128
|
|
109
129
|
def test_linked_data
|
110
|
-
assert_kind_of(
|
130
|
+
assert_kind_of(TransitionDataTimezoneInfo, LinkedDataTest.get)
|
111
131
|
assert_equal('Test/Data/Zone2', LinkedDataTest.get.identifier)
|
112
132
|
assert_equal(:LMT, LinkedDataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,14)).abbreviation)
|
113
133
|
assert_equal(:GMT, LinkedDataTest.get.period_for_utc(DateTime.new(1847,12,1,0,1,15)).abbreviation)
|
@@ -1,6 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2006-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')
|
4
24
|
|
5
25
|
include TZInfo
|
6
26
|
|
data/test/tc_timezone_info.rb
CHANGED
@@ -1,6 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2006-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')
|
4
24
|
|
5
25
|
include TZInfo
|
6
26
|
|