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
@@ -21,27 +21,34 @@
|
|
21
21
|
#++
|
22
22
|
|
23
23
|
require 'date'
|
24
|
+
require 'rational'
|
24
25
|
require 'time'
|
25
26
|
|
26
27
|
module TZInfo
|
27
|
-
# Used by TZInfo internally to represent either a Time, DateTime or
|
28
|
-
# timestamp (seconds since 1970-01-01 00:00:00).
|
29
|
-
#
|
30
|
-
# @private
|
28
|
+
# Used by TZInfo internally to represent either a Time, DateTime or
|
29
|
+
# an Integer timestamp (seconds since 1970-01-01 00:00:00).
|
31
30
|
class TimeOrDateTime #:nodoc:
|
32
31
|
include Comparable
|
33
32
|
|
34
33
|
# Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime
|
35
|
-
# or
|
36
|
-
# ignored.
|
34
|
+
# or Integer. If using a Time or DateTime, any time zone information
|
35
|
+
# is ignored.
|
36
|
+
#
|
37
|
+
# Integer timestamps must be within the range supported by Time on the
|
38
|
+
# platform being used.
|
37
39
|
def initialize(timeOrDateTime)
|
38
40
|
@time = nil
|
39
41
|
@datetime = nil
|
40
42
|
@timestamp = nil
|
41
43
|
|
42
44
|
if timeOrDateTime.is_a?(Time)
|
43
|
-
@time = timeOrDateTime
|
44
|
-
|
45
|
+
@time = timeOrDateTime
|
46
|
+
|
47
|
+
# Avoid using the slower Rational class unless necessary.
|
48
|
+
nsec = RubyCoreSupport.time_nsec(@time)
|
49
|
+
usec = nsec % 1000 == 0 ? nsec / 1000 : Rational(nsec, 1000)
|
50
|
+
|
51
|
+
@time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec, usec) unless @time.zone == 'UTC'
|
45
52
|
@orig = @time
|
46
53
|
elsif timeOrDateTime.is_a?(DateTime)
|
47
54
|
@datetime = timeOrDateTime
|
@@ -49,17 +56,25 @@ module TZInfo
|
|
49
56
|
@orig = @datetime
|
50
57
|
else
|
51
58
|
@timestamp = timeOrDateTime.to_i
|
59
|
+
|
60
|
+
if !RubyCoreSupport.time_supports_64bit && (@timestamp > 2147483647 || @timestamp < -2147483648 || (@timestamp < 0 && !RubyCoreSupport.time_supports_negative))
|
61
|
+
raise RangeError, 'Timestamp is outside the supported range of Time on this platform'
|
62
|
+
end
|
63
|
+
|
52
64
|
@orig = @timestamp
|
53
65
|
end
|
54
66
|
end
|
55
67
|
|
56
68
|
# Returns the time as a Time.
|
69
|
+
#
|
70
|
+
# When converting from a DateTime, the result is truncated to microsecond
|
71
|
+
# precision.
|
57
72
|
def to_time
|
58
|
-
unless @time
|
59
|
-
if @timestamp
|
73
|
+
unless @time
|
74
|
+
if @timestamp
|
60
75
|
@time = Time.at(@timestamp).utc
|
61
76
|
else
|
62
|
-
@time = Time.utc(year, mon, mday, hour, min, sec)
|
77
|
+
@time = Time.utc(year, mon, mday, hour, min, sec, usec)
|
63
78
|
end
|
64
79
|
end
|
65
80
|
|
@@ -67,9 +82,15 @@ module TZInfo
|
|
67
82
|
end
|
68
83
|
|
69
84
|
# Returns the time as a DateTime.
|
85
|
+
#
|
86
|
+
# When converting from a Time, the result is truncated to microsecond
|
87
|
+
# precision.
|
70
88
|
def to_datetime
|
71
89
|
unless @datetime
|
72
|
-
|
90
|
+
# Avoid using Rational unless necessary.
|
91
|
+
u = usec
|
92
|
+
s = u == 0 ? sec : Rational(sec * 1000000 + u, 1000000)
|
93
|
+
@datetime = RubyCoreSupport.datetime_new(year, mon, mday, hour, min, s)
|
73
94
|
end
|
74
95
|
|
75
96
|
@datetime
|
@@ -173,38 +194,44 @@ module TZInfo
|
|
173
194
|
end
|
174
195
|
end
|
175
196
|
|
176
|
-
#
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
197
|
+
# Returns the number of microseconds for the time.
|
198
|
+
def usec
|
199
|
+
if @time
|
200
|
+
@time.usec
|
201
|
+
elsif @datetime
|
202
|
+
# Ruby 1.8 has sec_fraction (of which the documentation says
|
203
|
+
# 'I do NOT recommend you to use this method'). sec_fraction no longer
|
204
|
+
# exists in Ruby 1.9.
|
205
|
+
|
206
|
+
# Calculate the sec_fraction from the day_fraction.
|
207
|
+
((@datetime.day_fraction - OffsetRationals.rational_for_offset(@datetime.hour * 3600 + @datetime.min * 60 + @datetime.sec)) * 86400000000).to_i
|
208
|
+
else
|
209
|
+
0
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Compares this TimeOrDateTime with another Time, DateTime, timestamp
|
214
|
+
# (Integer) or TimeOrDateTime. Returns -1, 0 or +1 depending
|
215
|
+
# whether the receiver is less than, equal to, or greater than
|
216
|
+
# timeOrDateTime.
|
181
217
|
#
|
182
|
-
#
|
183
|
-
#
|
218
|
+
# Comparisons involving a DateTime will be performed using DateTime#<=>.
|
219
|
+
# Comparisons that don't involve a DateTime, but include a Time will be
|
220
|
+
# performed with Time#<=>. Otherwise comparisons will be performed with
|
221
|
+
# Integer#<=>.
|
184
222
|
def <=>(timeOrDateTime)
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
if @orig.is_a?(DateTime) || orig.is_a?(DateTime)
|
194
|
-
# If either is a DateTime, assume it is there for a reason
|
195
|
-
# (i.e. for range).
|
196
|
-
to_datetime <=> timeOrDateTime.to_datetime
|
197
|
-
elsif orig.is_a?(Time)
|
198
|
-
to_time <=> timeOrDateTime.to_time
|
199
|
-
else
|
200
|
-
to_i <=> timeOrDateTime.to_i
|
201
|
-
end
|
202
|
-
elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime)
|
223
|
+
unless timeOrDateTime.is_a?(TimeOrDateTime)
|
224
|
+
timeOrDateTime = TimeOrDateTime.wrap(timeOrDateTime)
|
225
|
+
end
|
226
|
+
|
227
|
+
orig = timeOrDateTime.to_orig
|
228
|
+
|
229
|
+
if @orig.is_a?(DateTime) || orig.is_a?(DateTime)
|
203
230
|
# If either is a DateTime, assume it is there for a reason
|
204
|
-
# (i.e. for range).
|
205
|
-
to_datetime <=>
|
206
|
-
elsif
|
207
|
-
to_time <=> timeOrDateTime
|
231
|
+
# (i.e. for its larger range of acceptable values on 32-bit systems).
|
232
|
+
to_datetime <=> timeOrDateTime.to_datetime
|
233
|
+
elsif @orig.is_a?(Time) || orig.is_a?(Time)
|
234
|
+
to_time <=> timeOrDateTime.to_time
|
208
235
|
else
|
209
236
|
to_i <=> timeOrDateTime.to_i
|
210
237
|
end
|
@@ -221,7 +248,7 @@ module TZInfo
|
|
221
248
|
if @orig.is_a?(DateTime)
|
222
249
|
TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds))
|
223
250
|
else
|
224
|
-
# + defined for Time and
|
251
|
+
# + defined for Time and Integer
|
225
252
|
TimeOrDateTime.new(@orig + seconds)
|
226
253
|
end
|
227
254
|
end
|
@@ -235,9 +262,11 @@ module TZInfo
|
|
235
262
|
self + (-seconds)
|
236
263
|
end
|
237
264
|
|
238
|
-
# Similar to the + operator, but
|
239
|
-
#
|
240
|
-
# based TimeOrDateTime.
|
265
|
+
# Similar to the + operator, but converts to a DateTime based TimeOrDateTime
|
266
|
+
# where the Time or Integer timestamp to go out of the allowed range for a
|
267
|
+
# Time, converts to a DateTime based TimeOrDateTime.
|
268
|
+
#
|
269
|
+
# Note that the range of Time varies based on the platform.
|
241
270
|
def add_with_convert(seconds)
|
242
271
|
if seconds == 0
|
243
272
|
self
|
@@ -248,7 +277,7 @@ module TZInfo
|
|
248
277
|
# A Time or timestamp.
|
249
278
|
result = to_i + seconds
|
250
279
|
|
251
|
-
if result <
|
280
|
+
if ((result > 2147483647 || result < -2147483648) && !RubyCoreSupport.time_supports_64bit) || (result < 0 && !RubyCoreSupport.time_supports_negative)
|
252
281
|
result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds))
|
253
282
|
else
|
254
283
|
result = TimeOrDateTime.new(@orig + seconds)
|
@@ -272,12 +301,14 @@ module TZInfo
|
|
272
301
|
# If no block is given, returns a TimeOrDateTime wrapping the given
|
273
302
|
# timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed
|
274
303
|
# and passed to the block. The result of the block must be a TimeOrDateTime.
|
275
|
-
# to_orig will be called on the result and the result of to_orig will be
|
276
|
-
# returned.
|
277
304
|
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
#
|
305
|
+
# The result of the block will be converted to the type of the originally
|
306
|
+
# passed in timeOrDateTime and then returned as the result of wrap.
|
307
|
+
#
|
308
|
+
# timeOrDateTime can be a Time, DateTime, timestamp (Integer) or
|
309
|
+
# TimeOrDateTime. If a TimeOrDateTime is passed in, no new TimeOrDateTime
|
310
|
+
# will be constructed and the value passed to wrap will be used when
|
311
|
+
# calling the block.
|
281
312
|
def self.wrap(timeOrDateTime)
|
282
313
|
t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime)
|
283
314
|
|
@@ -285,7 +316,7 @@ module TZInfo
|
|
285
316
|
t = yield t
|
286
317
|
|
287
318
|
if timeOrDateTime.is_a?(TimeOrDateTime)
|
288
|
-
t
|
319
|
+
t
|
289
320
|
elsif timeOrDateTime.is_a?(Time)
|
290
321
|
t.to_time
|
291
322
|
elsif timeOrDateTime.is_a?(DateTime)
|
data/lib/tzinfo/timezone.rb
CHANGED
@@ -23,23 +23,27 @@
|
|
23
23
|
require 'date'
|
24
24
|
|
25
25
|
module TZInfo
|
26
|
-
#
|
27
|
-
# possible
|
28
|
-
# to
|
29
|
-
#
|
30
|
-
#
|
26
|
+
# AmbiguousTime is raised to indicates that a specified time in a local
|
27
|
+
# timezone has more than one possible equivalent UTC time. This happens when
|
28
|
+
# transitioning from daylight savings time to standard time where the clocks
|
29
|
+
# are rolled back.
|
30
|
+
#
|
31
|
+
# AmbiguousTime is raised by period_for_local and local_to_utc when using an
|
32
|
+
# ambiguous time and not specifying any means to resolve the ambiguity.
|
31
33
|
class AmbiguousTime < StandardError
|
32
34
|
end
|
33
35
|
|
34
|
-
#
|
36
|
+
# PeriodNotFound is raised to indicate that no TimezonePeriod matching a given
|
37
|
+
# time could be found.
|
35
38
|
class PeriodNotFound < StandardError
|
36
39
|
end
|
37
40
|
|
38
|
-
#
|
41
|
+
# Raised by Timezone#get if the identifier given is not valid.
|
39
42
|
class InvalidTimezoneIdentifier < StandardError
|
40
43
|
end
|
41
44
|
|
42
|
-
#
|
45
|
+
# Raised if an attempt is made to use a timezone created with
|
46
|
+
# Timezone.new(nil).
|
43
47
|
class UnknownTimezone < StandardError
|
44
48
|
end
|
45
49
|
|
@@ -55,27 +59,15 @@ module TZInfo
|
|
55
59
|
#
|
56
60
|
# Each time conversion method returns an object of the same type it was
|
57
61
|
# passed.
|
58
|
-
#
|
59
|
-
# The timezone information all comes from the tz database
|
60
|
-
# (see http://www.twinsun.com/tz/tz-link.htm)
|
61
62
|
class Timezone
|
62
63
|
include Comparable
|
63
64
|
|
64
65
|
# Cache of loaded zones by identifier to avoid using require if a zone
|
65
66
|
# has already been loaded.
|
66
|
-
#
|
67
|
-
# @!visibility private
|
68
67
|
@@loaded_zones = {}
|
69
|
-
|
70
|
-
# Whether the timezones index has been loaded yet.
|
71
|
-
#
|
72
|
-
# @!visibility private
|
73
|
-
@@index_loaded = false
|
74
|
-
|
68
|
+
|
75
69
|
# Default value of the dst parameter of the local_to_utc and
|
76
70
|
# period_for_local methods.
|
77
|
-
#
|
78
|
-
# @!visibility private
|
79
71
|
@@default_dst = nil
|
80
72
|
|
81
73
|
# Sets the default value of the optional dst parameter of the
|
@@ -100,36 +92,11 @@ module TZInfo
|
|
100
92
|
# Raises InvalidTimezoneIdentifier if the timezone couldn't be found.
|
101
93
|
def self.get(identifier)
|
102
94
|
instance = @@loaded_zones[identifier]
|
95
|
+
|
103
96
|
unless instance
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
# Use a temporary variable to avoid an rdoc warning
|
108
|
-
file = "tzinfo/definitions/#{identifier}".untaint
|
109
|
-
require file
|
110
|
-
|
111
|
-
m = Definitions
|
112
|
-
identifier.split(/\//).each {|part|
|
113
|
-
m = m.const_get(part)
|
114
|
-
}
|
115
|
-
|
116
|
-
info = m.get
|
117
|
-
|
118
|
-
# Could make Timezone subclasses register an interest in an info
|
119
|
-
# type. Since there are currently only two however, there isn't
|
120
|
-
# much point.
|
121
|
-
if info.kind_of?(DataTimezoneInfo)
|
122
|
-
instance = DataTimezone.new(info)
|
123
|
-
elsif info.kind_of?(LinkedTimezoneInfo)
|
124
|
-
instance = LinkedTimezone.new(info)
|
125
|
-
else
|
126
|
-
raise InvalidTimezoneIdentifier, "No handler for info type #{info.class}"
|
127
|
-
end
|
128
|
-
|
129
|
-
@@loaded_zones[instance.identifier] = instance
|
130
|
-
rescue LoadError, NameError => e
|
131
|
-
raise InvalidTimezoneIdentifier, e.message
|
132
|
-
end
|
97
|
+
info = data_source.load_timezone_info(identifier)
|
98
|
+
instance = info.create_timezone
|
99
|
+
@@loaded_zones[instance.identifier] = instance
|
133
100
|
end
|
134
101
|
|
135
102
|
instance
|
@@ -165,8 +132,7 @@ module TZInfo
|
|
165
132
|
# Returns an array containing the identifiers of all the available
|
166
133
|
# Timezones.
|
167
134
|
def self.all_identifiers
|
168
|
-
|
169
|
-
Indexes::Timezones.timezones
|
135
|
+
data_source.timezone_identifiers
|
170
136
|
end
|
171
137
|
|
172
138
|
# Returns an array containing all the available Timezones that are based
|
@@ -181,8 +147,7 @@ module TZInfo
|
|
181
147
|
# Returns an array containing the identifiers of all the available
|
182
148
|
# Timezones that are based on data (are not links to other Timezones)..
|
183
149
|
def self.all_data_zone_identifiers
|
184
|
-
|
185
|
-
Indexes::Timezones.data_timezones
|
150
|
+
data_source.data_timezone_identifiers
|
186
151
|
end
|
187
152
|
|
188
153
|
# Returns an array containing all the available Timezones that are links
|
@@ -197,8 +162,7 @@ module TZInfo
|
|
197
162
|
# Returns an array containing the identifiers of all the available
|
198
163
|
# Timezones that are links to other Timezones.
|
199
164
|
def self.all_linked_zone_identifiers
|
200
|
-
|
201
|
-
Indexes::Timezones.linked_timezones
|
165
|
+
data_source.linked_timezone_identifiers
|
202
166
|
end
|
203
167
|
|
204
168
|
# Returns all the Timezones defined for all Countries. This is not the
|
@@ -498,13 +462,10 @@ module TZInfo
|
|
498
462
|
|
499
463
|
# Compares two Timezones based on their identifier. Returns -1 if tz is less
|
500
464
|
# than self, 0 if tz is equal to self and +1 if tz is greater than self.
|
501
|
-
#
|
502
|
-
# Returns nil if tz is not comparable with Timezone instances.
|
503
465
|
def <=>(tz)
|
504
|
-
return nil unless tz.is_a?(Timezone)
|
505
466
|
identifier <=> tz.identifier
|
506
467
|
end
|
507
|
-
|
468
|
+
|
508
469
|
# Returns true if and only if the identifier of tz is equal to the
|
509
470
|
# identifier of this Timezone.
|
510
471
|
def eql?(tz)
|
@@ -526,19 +487,16 @@ module TZInfo
|
|
526
487
|
Timezone.get(data)
|
527
488
|
end
|
528
489
|
|
529
|
-
private
|
530
|
-
# Loads in the index of timezones if it hasn't already been loaded.
|
531
|
-
def self.load_index
|
532
|
-
unless @@index_loaded
|
533
|
-
require 'tzinfo/indexes/timezones'
|
534
|
-
@@index_loaded = true
|
535
|
-
end
|
536
|
-
end
|
537
|
-
|
490
|
+
private
|
538
491
|
# Returns an array of proxies corresponding to the given array of
|
539
492
|
# identifiers.
|
540
493
|
def self.get_proxies(identifiers)
|
541
494
|
identifiers.collect {|identifier| get_proxy(identifier)}
|
542
495
|
end
|
496
|
+
|
497
|
+
# Returns the current DataSource
|
498
|
+
def self.data_source
|
499
|
+
DataSource.get
|
500
|
+
end
|
543
501
|
end
|
544
502
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2010 Philip Ross
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -24,8 +24,6 @@ module TZInfo
|
|
24
24
|
|
25
25
|
# TimezoneDefinition is included into Timezone definition modules.
|
26
26
|
# TimezoneDefinition provides the methods for defining timezones.
|
27
|
-
#
|
28
|
-
# @private
|
29
27
|
module TimezoneDefinition #:nodoc:
|
30
28
|
# Add class methods to the includee.
|
31
29
|
def self.append_features(base)
|
@@ -34,12 +32,11 @@ module TZInfo
|
|
34
32
|
end
|
35
33
|
|
36
34
|
# Class methods for inclusion.
|
37
|
-
#
|
38
|
-
# @private
|
39
35
|
module ClassMethods #:nodoc:
|
40
|
-
# Returns and yields a
|
36
|
+
# Returns and yields a TransitionDataTimezoneInfo object to define a
|
37
|
+
# timezone.
|
41
38
|
def timezone(identifier)
|
42
|
-
yield @timezone =
|
39
|
+
yield @timezone = TransitionDataTimezoneInfo.new(identifier)
|
43
40
|
end
|
44
41
|
|
45
42
|
# Defines a linked timezone.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006
|
2
|
+
# Copyright (c) 2006 Philip Ross
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -23,8 +23,6 @@
|
|
23
23
|
module TZInfo
|
24
24
|
# The timezone index file includes TimezoneIndexDefinition which provides
|
25
25
|
# methods used to define timezones in the index.
|
26
|
-
#
|
27
|
-
# @private
|
28
26
|
module TimezoneIndexDefinition #:nodoc:
|
29
27
|
def self.append_features(base)
|
30
28
|
super
|
@@ -36,9 +34,6 @@ module TZInfo
|
|
36
34
|
end
|
37
35
|
end
|
38
36
|
|
39
|
-
# Class methods for inclusion.
|
40
|
-
#
|
41
|
-
# @private
|
42
37
|
module ClassMethods #:nodoc:
|
43
38
|
# Defines a timezone based on data.
|
44
39
|
def timezone(identifier)
|
data/lib/tzinfo/timezone_info.rb
CHANGED
@@ -21,10 +21,8 @@
|
|
21
21
|
#++
|
22
22
|
|
23
23
|
module TZInfo
|
24
|
-
# Represents a timezone defined
|
25
|
-
|
26
|
-
# @private
|
27
|
-
class TimezoneInfo #:nodoc:
|
24
|
+
# Represents a timezone defined by a data source.
|
25
|
+
class TimezoneInfo
|
28
26
|
|
29
27
|
# The timezone identifier.
|
30
28
|
attr_reader :identifier
|
@@ -38,5 +36,11 @@ module TZInfo
|
|
38
36
|
def inspect
|
39
37
|
"#<#{self.class}: #@identifier>"
|
40
38
|
end
|
39
|
+
|
40
|
+
# Constructs a Timezone instance for the timezone represented by this
|
41
|
+
# TimezoneInfo.
|
42
|
+
def create_timezone
|
43
|
+
raise NotImplementedError, 'Subclasses must override create_timezone'
|
44
|
+
end
|
41
45
|
end
|
42
46
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2012 Philip Ross
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -22,8 +22,6 @@
|
|
22
22
|
|
23
23
|
module TZInfo
|
24
24
|
# Represents an offset defined in a Timezone data file.
|
25
|
-
#
|
26
|
-
# @private
|
27
25
|
class TimezoneOffsetInfo #:nodoc:
|
28
26
|
# The base offset of the timezone from UTC in seconds.
|
29
27
|
attr_reader :utc_offset
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2005-
|
2
|
+
# Copyright (c) 2005-2013 Philip Ross
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -23,19 +23,22 @@
|
|
23
23
|
module TZInfo
|
24
24
|
# A period of time in a timezone where the same offset from UTC applies.
|
25
25
|
#
|
26
|
-
# All the methods that take times accept instances of Time
|
27
|
-
#
|
26
|
+
# All the methods that take times accept instances of Time or DateTime as well
|
27
|
+
# as Integer timestamps.
|
28
28
|
class TimezonePeriod
|
29
29
|
# The TimezoneTransitionInfo that defines the start of this TimezonePeriod
|
30
30
|
# (may be nil if unbounded).
|
31
|
-
attr_reader :start_transition
|
31
|
+
attr_reader :start_transition #:nodoc:
|
32
|
+
protected :start_transition
|
32
33
|
|
33
34
|
# The TimezoneTransitionInfo that defines the end of this TimezonePeriod
|
34
35
|
# (may be nil if unbounded).
|
35
|
-
attr_reader :end_transition
|
36
|
+
attr_reader :end_transition #:nodoc:
|
37
|
+
protected :end_transition
|
36
38
|
|
37
39
|
# The TimezoneOffsetInfo for this period.
|
38
|
-
attr_reader :offset
|
40
|
+
attr_reader :offset #:nodoc:
|
41
|
+
protected :offset
|
39
42
|
|
40
43
|
# Initializes a new TimezonePeriod.
|
41
44
|
def initialize(start_transition, end_transition, offset = nil)
|
@@ -96,23 +99,45 @@ module TZInfo
|
|
96
99
|
@start_transition ? @start_transition.at.to_datetime : nil
|
97
100
|
end
|
98
101
|
|
102
|
+
# The start time of the period in UTC as a Time. May be nil if unbounded.
|
103
|
+
def utc_start_time
|
104
|
+
@start_transition ? @start_transition.at.to_time : nil
|
105
|
+
end
|
106
|
+
|
99
107
|
# The end time of the period in UTC as a DateTime. May be nil if unbounded.
|
100
108
|
def utc_end
|
101
109
|
@end_transition ? @end_transition.at.to_datetime : nil
|
102
110
|
end
|
103
111
|
|
112
|
+
# The end time of the period in UTC as a Time. May be nil if unbounded.
|
113
|
+
def utc_end_time
|
114
|
+
@end_transition ? @end_transition.at.to_time : nil
|
115
|
+
end
|
116
|
+
|
104
117
|
# The start time of the period in local time as a DateTime. May be nil if
|
105
118
|
# unbounded.
|
106
119
|
def local_start
|
107
120
|
@start_transition ? @start_transition.local_start.to_datetime : nil
|
108
121
|
end
|
109
122
|
|
123
|
+
# The start time of the period in local time as a Time. May be nil if
|
124
|
+
# unbounded.
|
125
|
+
def local_start_time
|
126
|
+
@start_transition ? @start_transition.local_start.to_time : nil
|
127
|
+
end
|
128
|
+
|
110
129
|
# The end time of the period in local time as a DateTime. May be nil if
|
111
130
|
# unbounded.
|
112
131
|
def local_end
|
113
132
|
@end_transition ? @end_transition.local_end.to_datetime : nil
|
114
133
|
end
|
115
134
|
|
135
|
+
# The end time of the period in local time as a Time. May be nil if
|
136
|
+
# unbounded.
|
137
|
+
def local_end_time
|
138
|
+
@end_transition ? @end_transition.local_end.to_time : nil
|
139
|
+
end
|
140
|
+
|
116
141
|
# true if daylight savings is in effect for this period; otherwise false.
|
117
142
|
def dst?
|
118
143
|
@offset.dst?
|
@@ -23,9 +23,8 @@
|
|
23
23
|
require 'date'
|
24
24
|
|
25
25
|
module TZInfo
|
26
|
-
# Represents an offset
|
27
|
-
#
|
28
|
-
# @private
|
26
|
+
# Represents an transition from one timezone offset to another at a particular
|
27
|
+
# date and time.
|
29
28
|
class TimezoneTransitionInfo #:nodoc:
|
30
29
|
# The offset this transition changes to (a TimezoneOffsetInfo instance).
|
31
30
|
attr_reader :offset
|
@@ -38,26 +37,57 @@ module TZInfo
|
|
38
37
|
attr_reader :numerator_or_time
|
39
38
|
protected :numerator_or_time
|
40
39
|
|
41
|
-
# Either the
|
40
|
+
# Either the denominator of the DateTime if the transition time is defined
|
42
41
|
# as a DateTime, otherwise nil.
|
43
42
|
attr_reader :denominator
|
44
43
|
protected :denominator
|
45
44
|
|
46
45
|
# Creates a new TimezoneTransitionInfo with the given offset,
|
47
|
-
# previous_offset (both TimezoneOffsetInfo instances) and UTC time.
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
46
|
+
# previous_offset (both TimezoneOffsetInfo instances) and UTC time.
|
47
|
+
#
|
48
|
+
# The time can be specified as a timestamp, as a rational to create a
|
49
|
+
# DateTime or as both.
|
50
|
+
#
|
51
|
+
# If both a timestamp and rational are given, then the rational will only
|
52
|
+
# be used if the timestamp falls outside of the range of Time on the
|
53
|
+
# platform being used at runtime.
|
54
|
+
#
|
55
|
+
# DateTimes are created from the rational as follows:
|
51
56
|
#
|
52
|
-
#
|
57
|
+
# RubyCoreSupport.datetime_new!(RubyCoreSupport.rational_new!(numerator_or_time, denominator), 0, Date::ITALY)
|
53
58
|
#
|
54
59
|
# For performance reasons, the numerator and denominator must be specified
|
55
60
|
# in their lowest form.
|
56
|
-
def initialize(offset, previous_offset,
|
61
|
+
def initialize(offset, previous_offset, numerator_or_timestamp, denominator_or_numerator = nil, denominator = nil)
|
57
62
|
@offset = offset
|
58
63
|
@previous_offset = previous_offset
|
59
|
-
|
60
|
-
|
64
|
+
|
65
|
+
if denominator
|
66
|
+
numerator = denominator_or_numerator
|
67
|
+
timestamp = numerator_or_timestamp
|
68
|
+
elsif denominator_or_numerator
|
69
|
+
numerator = numerator_or_timestamp
|
70
|
+
denominator = denominator_or_numerator
|
71
|
+
timestamp = nil
|
72
|
+
else
|
73
|
+
numerator = nil
|
74
|
+
denominator = nil
|
75
|
+
timestamp = numerator_or_timestamp
|
76
|
+
end
|
77
|
+
|
78
|
+
# Determine whether to use the timestamp or the numerator and denominator.
|
79
|
+
if numerator && (
|
80
|
+
!timestamp ||
|
81
|
+
(timestamp < 0 && !RubyCoreSupport.time_supports_negative) ||
|
82
|
+
((timestamp < -2147483648 || timestamp > 2147483647) && !RubyCoreSupport.time_supports_64bit)
|
83
|
+
)
|
84
|
+
|
85
|
+
@numerator_or_time = numerator
|
86
|
+
@denominator = denominator
|
87
|
+
else
|
88
|
+
@numerator_or_time = timestamp
|
89
|
+
@denominator = nil
|
90
|
+
end
|
61
91
|
|
62
92
|
@at = nil
|
63
93
|
@local_end = nil
|