tzinfo 0.3.61 → 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 -150
- 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 -714
- 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 -145
- data/lib/tzinfo/definitions/Africa/Casablanca.rb +0 -141
- data/lib/tzinfo/definitions/Africa/Ceuta.rb +0 -172
- 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 -131
- 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 -196
- data/lib/tzinfo/definitions/America/Anchorage.rb +0 -196
- 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 -174
- 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 -140
- 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 -199
- data/lib/tzinfo/definitions/America/Buenos_Aires.rb +0 -13
- data/lib/tzinfo/definitions/America/Cambridge_Bay.rb +0 -173
- 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 -283
- data/lib/tzinfo/definitions/America/Chihuahua.rb +0 -136
- 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 -204
- data/lib/tzinfo/definitions/America/Detroit.rb +0 -188
- data/lib/tzinfo/definitions/America/Dominica.rb +0 -13
- data/lib/tzinfo/definitions/America/Edmonton.rb +0 -196
- 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 -186
- data/lib/tzinfo/definitions/America/Godthab.rb +0 -13
- data/lib/tzinfo/definitions/America/Goose_Bay.rb +0 -255
- data/lib/tzinfo/definitions/America/Grand_Turk.rb +0 -161
- 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 -274
- data/lib/tzinfo/definitions/America/Havana.rb +0 -201
- data/lib/tzinfo/definitions/America/Hermosillo.rb +0 -35
- data/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb +0 -149
- data/lib/tzinfo/definitions/America/Indiana/Knox.rb +0 -203
- data/lib/tzinfo/definitions/America/Indiana/Marengo.rb +0 -153
- data/lib/tzinfo/definitions/America/Indiana/Petersburg.rb +0 -166
- data/lib/tzinfo/definitions/America/Indiana/Tell_City.rb +0 -148
- data/lib/tzinfo/definitions/America/Indiana/Vevay.rb +0 -131
- data/lib/tzinfo/definitions/America/Indiana/Vincennes.rb +0 -151
- data/lib/tzinfo/definitions/America/Indiana/Winamac.rb +0 -157
- data/lib/tzinfo/definitions/America/Indianapolis.rb +0 -13
- data/lib/tzinfo/definitions/America/Inuvik.rb +0 -166
- data/lib/tzinfo/definitions/America/Iqaluit.rb +0 -170
- 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 -195
- data/lib/tzinfo/definitions/America/Kentucky/Louisville.rb +0 -228
- data/lib/tzinfo/definitions/America/Kentucky/Monticello.rb +0 -198
- 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 -232
- 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 -131
- data/lib/tzinfo/definitions/America/Mazatlan.rb +0 -139
- data/lib/tzinfo/definitions/America/Mendoza.rb +0 -13
- data/lib/tzinfo/definitions/America/Menominee.rb +0 -190
- data/lib/tzinfo/definitions/America/Merida.rb +0 -132
- data/lib/tzinfo/definitions/America/Metlakatla.rb +0 -130
- data/lib/tzinfo/definitions/America/Mexico_City.rb +0 -144
- data/lib/tzinfo/definitions/America/Miquelon.rb +0 -149
- data/lib/tzinfo/definitions/America/Moncton.rb +0 -254
- data/lib/tzinfo/definitions/America/Monterrey.rb +0 -131
- 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 -282
- data/lib/tzinfo/definitions/America/Nipigon.rb +0 -181
- data/lib/tzinfo/definitions/America/Nome.rb +0 -196
- data/lib/tzinfo/definitions/America/Noronha.rb +0 -57
- data/lib/tzinfo/definitions/America/North_Dakota/Beulah.rb +0 -200
- data/lib/tzinfo/definitions/America/North_Dakota/Center.rb +0 -200
- data/lib/tzinfo/definitions/America/North_Dakota/New_Salem.rb +0 -200
- data/lib/tzinfo/definitions/America/Nuuk.rb +0 -161
- data/lib/tzinfo/definitions/America/Ojinaga.rb +0 -136
- data/lib/tzinfo/definitions/America/Panama.rb +0 -20
- data/lib/tzinfo/definitions/America/Pangnirtung.rb +0 -173
- 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 -131
- 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 -138
- data/lib/tzinfo/definitions/America/Rainy_River.rb +0 -181
- data/lib/tzinfo/definitions/America/Rankin_Inlet.rb +0 -165
- 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 -165
- 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 -205
- 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 -163
- data/lib/tzinfo/definitions/America/Shiprock.rb +0 -13
- data/lib/tzinfo/definitions/America/Sitka.rb +0 -194
- data/lib/tzinfo/definitions/America/St_Barthelemy.rb +0 -13
- data/lib/tzinfo/definitions/America/St_Johns.rb +0 -288
- 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 -139
- data/lib/tzinfo/definitions/America/Thunder_Bay.rb +0 -186
- data/lib/tzinfo/definitions/America/Tijuana.rb +0 -196
- data/lib/tzinfo/definitions/America/Toronto.rb +0 -279
- data/lib/tzinfo/definitions/America/Tortola.rb +0 -13
- data/lib/tzinfo/definitions/America/Vancouver.rb +0 -236
- 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 -232
- data/lib/tzinfo/definitions/America/Yakutat.rb +0 -193
- data/lib/tzinfo/definitions/America/Yellowknife.rb +0 -169
- 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 -187
- 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 -111
- data/lib/tzinfo/definitions/Antarctica/Vostok.rb +0 -18
- 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 -161
- 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 -185
- data/lib/tzinfo/definitions/Asia/Bishkek.rb +0 -72
- data/lib/tzinfo/definitions/Asia/Brunei.rb +0 -20
- 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 -195
- 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 -171
- data/lib/tzinfo/definitions/Asia/Gaza.rb +0 -196
- data/lib/tzinfo/definitions/Asia/Harbin.rb +0 -13
- data/lib/tzinfo/definitions/Asia/Hebron.rb +0 -198
- 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 -195
- 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 -31
- 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 -171
- 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 -147
- 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 -272
- data/lib/tzinfo/definitions/Atlantic/Bermuda.rb +0 -202
- data/lib/tzinfo/definitions/Atlantic/Canary.rb +0 -163
- 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 -159
- data/lib/tzinfo/definitions/Atlantic/Jan_Mayen.rb +0 -13
- data/lib/tzinfo/definitions/Atlantic/Madeira.rb +0 -271
- data/lib/tzinfo/definitions/Atlantic/Reykjavik.rb +0 -87
- 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 -187
- data/lib/tzinfo/definitions/Australia/Brisbane.rb +0 -35
- data/lib/tzinfo/definitions/Australia/Broken_Hill.rb +0 -189
- 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 -197
- 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 -160
- data/lib/tzinfo/definitions/Australia/Melbourne.rb +0 -185
- 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 -185
- 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 -177
- data/lib/tzinfo/definitions/CST6CDT.rb +0 -192
- 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 -163
- data/lib/tzinfo/definitions/EST.rb +0 -14
- data/lib/tzinfo/definitions/EST5EDT.rb +0 -192
- 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 -228
- data/lib/tzinfo/definitions/Europe/Andorra.rb +0 -153
- data/lib/tzinfo/definitions/Europe/Astrakhan.rb +0 -84
- data/lib/tzinfo/definitions/Europe/Athens.rb +0 -185
- data/lib/tzinfo/definitions/Europe/Belfast.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Belgrade.rb +0 -163
- data/lib/tzinfo/definitions/Europe/Berlin.rb +0 -188
- data/lib/tzinfo/definitions/Europe/Bratislava.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Brussels.rb +0 -232
- data/lib/tzinfo/definitions/Europe/Bucharest.rb +0 -181
- data/lib/tzinfo/definitions/Europe/Budapest.rb +0 -195
- data/lib/tzinfo/definitions/Europe/Busingen.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Chisinau.rb +0 -191
- data/lib/tzinfo/definitions/Europe/Copenhagen.rb +0 -179
- data/lib/tzinfo/definitions/Europe/Dublin.rb +0 -276
- data/lib/tzinfo/definitions/Europe/Gibraltar.rb +0 -245
- data/lib/tzinfo/definitions/Europe/Guernsey.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Helsinki.rb +0 -163
- 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 -170
- data/lib/tzinfo/definitions/Europe/Kirov.rb +0 -83
- data/lib/tzinfo/definitions/Europe/Lisbon.rb +0 -270
- data/lib/tzinfo/definitions/Europe/Ljubljana.rb +0 -13
- data/lib/tzinfo/definitions/Europe/London.rb +0 -288
- data/lib/tzinfo/definitions/Europe/Luxembourg.rb +0 -231
- data/lib/tzinfo/definitions/Europe/Madrid.rb +0 -209
- data/lib/tzinfo/definitions/Europe/Malta.rb +0 -213
- 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 -233
- 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 -185
- data/lib/tzinfo/definitions/Europe/Paris.rb +0 -232
- data/lib/tzinfo/definitions/Europe/Podgorica.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Prague.rb +0 -190
- data/lib/tzinfo/definitions/Europe/Riga.rb +0 -176
- data/lib/tzinfo/definitions/Europe/Rome.rb +0 -215
- 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 -173
- data/lib/tzinfo/definitions/Europe/Stockholm.rb +0 -165
- data/lib/tzinfo/definitions/Europe/Tallinn.rb +0 -172
- data/lib/tzinfo/definitions/Europe/Tirane.rb +0 -177
- 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 -168
- 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 -183
- data/lib/tzinfo/definitions/Europe/Vilnius.rb +0 -170
- data/lib/tzinfo/definitions/Europe/Volgograd.rb +0 -85
- data/lib/tzinfo/definitions/Europe/Warsaw.rb +0 -212
- data/lib/tzinfo/definitions/Europe/Zagreb.rb +0 -13
- data/lib/tzinfo/definitions/Europe/Zaporozhye.rb +0 -171
- data/lib/tzinfo/definitions/Europe/Zurich.rb +0 -165
- 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 -18
- data/lib/tzinfo/definitions/Indian/Cocos.rb +0 -18
- data/lib/tzinfo/definitions/Indian/Comoro.rb +0 -13
- data/lib/tzinfo/definitions/Indian/Kerguelen.rb +0 -18
- data/lib/tzinfo/definitions/Indian/Mahe.rb +0 -18
- 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 -18
- 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 -177
- data/lib/tzinfo/definitions/MST.rb +0 -14
- data/lib/tzinfo/definitions/MST7MDT.rb +0 -192
- 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 -192
- data/lib/tzinfo/definitions/Pacific/Apia.rb +0 -48
- data/lib/tzinfo/definitions/Pacific/Auckland.rb +0 -202
- data/lib/tzinfo/definitions/Pacific/Bougainville.rb +0 -25
- data/lib/tzinfo/definitions/Pacific/Chatham.rb +0 -173
- data/lib/tzinfo/definitions/Pacific/Chuuk.rb +0 -25
- data/lib/tzinfo/definitions/Pacific/Easter.rb +0 -185
- 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 -103
- data/lib/tzinfo/definitions/Pacific/Funafuti.rb +0 -18
- 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 -27
- 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 -88
- 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 -27
- 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 -18
- data/lib/tzinfo/definitions/Pacific/Wallis.rb +0 -18
- 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 -163
- 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 -930
- data/lib/tzinfo/indexes/timezones.rb +0 -605
- data/lib/tzinfo/tzdataparser.rb +0 -1287
- data/test/in_load_path/payload.rb +0 -1
- data/tzinfo.gemspec +0 -19
data/Rakefile
CHANGED
@@ -1,282 +1,87 @@
|
|
1
|
-
# Available options:
|
2
|
-
#
|
3
|
-
# rake test - Runs all test cases.
|
4
|
-
# rake package - Runs test cases and builds packages for distribution.
|
5
|
-
# rake rdoc - Builds API documentation in doc dir.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
def
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
package_task
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
|
93
|
-
Rake::TestTask.new('test') do |t|
|
94
|
-
# Force a particular timezone to be local (helps find issues when local
|
95
|
-
# timezone isn't GMT). This won't work on Windows.
|
96
|
-
ENV['TZ'] = 'America/Los_Angeles'
|
97
|
-
|
98
|
-
t.libs << '.'
|
99
|
-
t.pattern = 'test/tc_*.rb'
|
100
|
-
t.verbose = true
|
101
|
-
end
|
102
|
-
|
103
|
-
|
104
|
-
Rake::RDocTask.new do |rdoc|
|
105
|
-
rdoc.rdoc_dir = 'doc'
|
106
|
-
rdoc.title = "TZInfo"
|
107
|
-
rdoc.options << '--inline-source'
|
108
|
-
rdoc.options.concat SPEC.rdoc_options
|
109
|
-
rdoc.rdoc_files.include(*SPEC.extra_rdoc_files)
|
110
|
-
rdoc.rdoc_files.include('lib')
|
111
|
-
end
|
112
|
-
|
113
|
-
task :build_tz_modules do
|
114
|
-
require 'lib/tzinfo/tzdataparser'
|
115
|
-
|
116
|
-
FileUtils.mkdir_p(BUILD_TZ_CLASSES_DIR)
|
117
|
-
begin
|
118
|
-
p = TZInfo::TZDataParser.new('data', BUILD_TZ_CLASSES_DIR)
|
119
|
-
p.execute
|
120
|
-
|
121
|
-
scm = Scm.create(File.dirname(__FILE__))
|
122
|
-
|
123
|
-
['indexes', 'definitions'].each do |dir|
|
124
|
-
scm.sync("#{BUILD_TZ_CLASSES_DIR}/#{dir}", "lib/tzinfo/#{dir}")
|
125
|
-
end
|
126
|
-
ensure
|
127
|
-
FileUtils.rm_rf(BUILD_TZ_CLASSES_DIR)
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
class Scm
|
132
|
-
def self.create(dir)
|
133
|
-
if File.directory?(File.join(dir, '.git'))
|
134
|
-
GitScm.new(dir)
|
135
|
-
elsif File.directory?(File.join(dir, '.svn'))
|
136
|
-
SvnScm.new(dir)
|
137
|
-
else
|
138
|
-
NullScm.new(dir)
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
def initialize(dir)
|
143
|
-
end
|
144
|
-
|
145
|
-
def sync(source_dir, target_dir)
|
146
|
-
puts "Sync from #{source_dir} to #{target_dir}#{command ? " using #{command}" : ''}"
|
147
|
-
sync_dirs(source_dir, target_dir)
|
148
|
-
end
|
149
|
-
|
150
|
-
protected
|
151
|
-
|
152
|
-
def exec_scm(params)
|
153
|
-
puts "#{command} #{params}"
|
154
|
-
`#{command} #{params}`
|
155
|
-
raise "#{command} exited with status #$?" if $? != 0
|
156
|
-
end
|
157
|
-
|
158
|
-
private
|
159
|
-
|
160
|
-
def sync_dirs(source_dir, target_dir)
|
161
|
-
# Assumes a directory will never turn into a file and vice-versa
|
162
|
-
# (files will all end in .rb, directories won't).
|
163
|
-
|
164
|
-
source_entries, target_entries = [source_dir, target_dir].collect do |dir|
|
165
|
-
Dir.entries(dir).delete_if {|entry| entry =~ /\A\./}.sort
|
166
|
-
end
|
167
|
-
|
168
|
-
until source_entries.empty? || target_entries.empty?
|
169
|
-
last_source = source_entries.last
|
170
|
-
last_target = target_entries.last
|
171
|
-
|
172
|
-
if last_source == last_target
|
173
|
-
source_file = File.join(source_dir, last_source)
|
174
|
-
target_file = File.join(target_dir, last_target)
|
175
|
-
|
176
|
-
if File.directory?(source_file)
|
177
|
-
sync_dirs(source_file, target_file)
|
178
|
-
else
|
179
|
-
FileUtils.cp(source_file, target_file)
|
180
|
-
end
|
181
|
-
|
182
|
-
source_entries.pop
|
183
|
-
target_entries.pop
|
184
|
-
elsif source_entries.last < target_entries.last
|
185
|
-
sync_only_in_target(target_dir, target_entries)
|
186
|
-
else
|
187
|
-
sync_only_in_source(source_dir, target_dir, source_entries)
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
until target_entries.empty?
|
192
|
-
sync_only_in_target(target_dir, target_entries)
|
193
|
-
end
|
194
|
-
|
195
|
-
until source_entries.empty?
|
196
|
-
sync_only_in_source(source_dir, target_dir, source_entries)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
def sync_only_in_target(target_dir, target_entries)
|
201
|
-
target_file = File.join(target_dir, target_entries.last)
|
202
|
-
delete(target_file)
|
203
|
-
target_entries.pop
|
204
|
-
end
|
205
|
-
|
206
|
-
def sync_only_in_source(source_dir, target_dir, source_entries)
|
207
|
-
source_file = File.join(source_dir, source_entries.last)
|
208
|
-
target_file = File.join(target_dir, source_entries.last)
|
209
|
-
|
210
|
-
if File.directory?(source_file)
|
211
|
-
Dir.mkdir(target_file)
|
212
|
-
add(target_file)
|
213
|
-
sync_dirs(source_file, target_file)
|
214
|
-
else
|
215
|
-
FileUtils.cp(source_file, target_file)
|
216
|
-
add(target_file)
|
217
|
-
end
|
218
|
-
|
219
|
-
source_entries.pop
|
220
|
-
end
|
221
|
-
end
|
222
|
-
|
223
|
-
class NullScm < Scm
|
224
|
-
def command
|
225
|
-
nil
|
226
|
-
end
|
227
|
-
|
228
|
-
def add(file)
|
229
|
-
end
|
230
|
-
|
231
|
-
def delete(file)
|
232
|
-
puts "rm -rf \"#{file}\""
|
233
|
-
FileUtils.rm_rf(file)
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
class GitScm < Scm
|
238
|
-
def command
|
239
|
-
'git'
|
240
|
-
end
|
241
|
-
|
242
|
-
def add(file)
|
243
|
-
unless File.directory?(file)
|
244
|
-
exec_scm "add \"#{file}\""
|
245
|
-
end
|
246
|
-
end
|
247
|
-
|
248
|
-
def delete(file)
|
249
|
-
exec_scm "rm -rf \"#{file}\""
|
250
|
-
end
|
251
|
-
end
|
252
|
-
|
253
|
-
class SvnScm < Scm
|
254
|
-
def command
|
255
|
-
'svn'
|
256
|
-
end
|
257
|
-
|
258
|
-
def add(file)
|
259
|
-
exec_scm "add \"#{file}\""
|
260
|
-
end
|
261
|
-
|
262
|
-
def delete(file)
|
263
|
-
exec_scm "delete --force \"#{file}\""
|
264
|
-
end
|
265
|
-
end
|
266
|
-
|
267
|
-
|
268
|
-
task :build_tz_module do
|
269
|
-
require 'lib/tzinfo/tzdataparser'
|
270
|
-
p = TZInfo::TZDataParser.new('data', 'lib/tzinfo')
|
271
|
-
p.generate_countries = false
|
272
|
-
p.only_zones = [ENV['zone']]
|
273
|
-
p.execute
|
274
|
-
end
|
275
|
-
|
276
|
-
task :build_countries do
|
277
|
-
require 'lib/tzinfo/tzdataparser'
|
278
|
-
p = TZInfo::TZDataParser.new('data', 'lib/tzinfo')
|
279
|
-
p.generate_countries = true
|
280
|
-
p.generate_zones = false
|
281
|
-
p.execute
|
282
|
-
end
|
1
|
+
# Available options:
|
2
|
+
#
|
3
|
+
# rake test - Runs all test cases.
|
4
|
+
# rake package - Runs test cases and builds packages for distribution.
|
5
|
+
# rake rdoc - Builds API documentation in doc dir.
|
6
|
+
|
7
|
+
require 'rake'
|
8
|
+
require 'rake/testtask'
|
9
|
+
require 'rdoc/task'
|
10
|
+
require 'rubygems'
|
11
|
+
require 'rubygems/package_task'
|
12
|
+
require 'fileutils'
|
13
|
+
|
14
|
+
spec = eval(File.read('tzinfo.gemspec'))
|
15
|
+
|
16
|
+
class TZInfoPackageTask < Gem::PackageTask
|
17
|
+
alias_method :orig_sh, :sh
|
18
|
+
private :orig_sh
|
19
|
+
|
20
|
+
def sh(*cmd, &block)
|
21
|
+
if cmd.first =~ /\A__tar_with_owner__ -?([zjcvf]+)(.*)\z/
|
22
|
+
opts = $1
|
23
|
+
args = $2
|
24
|
+
cmd[0] = "tar c --owner 0 --group 0 -#{opts.gsub('c', '')}#{args}"
|
25
|
+
end
|
26
|
+
|
27
|
+
orig_sh(*cmd, &block)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
package_task = TZInfoPackageTask.new(spec) do |pkg|
|
32
|
+
pkg.need_zip = true
|
33
|
+
pkg.need_tar_gz = true
|
34
|
+
pkg.tar_command = '__tar_with_owner__'
|
35
|
+
end
|
36
|
+
|
37
|
+
RDoc::Task.new do |rdoc|
|
38
|
+
rdoc.rdoc_dir = 'doc'
|
39
|
+
rdoc.title = 'TZInfo'
|
40
|
+
rdoc.main = 'README'
|
41
|
+
rdoc.options.concat spec.rdoc_options
|
42
|
+
rdoc.rdoc_files.include(spec.extra_rdoc_files)
|
43
|
+
rdoc.rdoc_files.include('lib')
|
44
|
+
end
|
45
|
+
|
46
|
+
Rake::Task[package_task.package_dir_path].enhance do
|
47
|
+
File.chmod(0755, package_task.package_dir_path)
|
48
|
+
recurse_chmod(package_task.package_dir_path)
|
49
|
+
end
|
50
|
+
|
51
|
+
Rake::Task[:package].enhance do
|
52
|
+
FileUtils.rm_rf(package_task.package_dir_path)
|
53
|
+
end
|
54
|
+
|
55
|
+
def recurse_chmod(dir)
|
56
|
+
File.chmod(0755, dir)
|
57
|
+
|
58
|
+
Dir.entries(dir).each do |entry|
|
59
|
+
if entry != '.' && entry != '..'
|
60
|
+
path = File.join(dir, entry)
|
61
|
+
if File.directory?(path)
|
62
|
+
recurse_chmod(path)
|
63
|
+
else
|
64
|
+
File.chmod(0644, path)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
task :test => [:test_ruby, :test_zoneinfo] do
|
71
|
+
end
|
72
|
+
|
73
|
+
def setup_tests(test_task, type)
|
74
|
+
# Force a particular timezone to be local (helps find issues when local
|
75
|
+
# timezone isn't GMT). This won't work on Windows.
|
76
|
+
ENV['TZ'] = 'America/Los_Angeles'
|
77
|
+
|
78
|
+
test_task.pattern = File.join(File.expand_path(File.dirname(__FILE__)), 'test', "ts_all_#{type}.rb")
|
79
|
+
end
|
80
|
+
|
81
|
+
Rake::TestTask.new('test_ruby') do |t|
|
82
|
+
setup_tests(t, :ruby)
|
83
|
+
end
|
84
|
+
|
85
|
+
Rake::TestTask.new('test_zoneinfo') do |t|
|
86
|
+
setup_tests(t, :zoneinfo)
|
87
|
+
end
|
data/lib/tzinfo/country.rb
CHANGED
@@ -21,39 +21,38 @@
|
|
21
21
|
#++
|
22
22
|
|
23
23
|
module TZInfo
|
24
|
-
#
|
24
|
+
# Raised by Country#get if the code given is not valid.
|
25
25
|
class InvalidCountryCode < StandardError
|
26
26
|
end
|
27
27
|
|
28
|
-
#
|
29
|
-
# For example:
|
28
|
+
# The Country class represents an ISO 3166-1 country. It can be used to
|
29
|
+
# obtain a list of Timezones for a country. For example:
|
30
30
|
#
|
31
31
|
# us = Country.get('US')
|
32
32
|
# us.zone_identifiers
|
33
33
|
# us.zones
|
34
34
|
# us.zone_info
|
35
|
+
#
|
36
|
+
# Country information available through TZInfo is intended as an aid for
|
37
|
+
# users, to help them select time zone data appropriate for their practical
|
38
|
+
# needs. It is not intended to take or endorse any position on legal or
|
39
|
+
# territorial claims.
|
35
40
|
class Country
|
36
41
|
include Comparable
|
37
42
|
|
38
43
|
# Defined countries.
|
39
|
-
#
|
40
|
-
# @!visibility private
|
41
44
|
@@countries = {}
|
42
45
|
|
43
46
|
# Whether the countries index has been loaded yet.
|
44
|
-
#
|
45
|
-
# @!visibility private
|
46
47
|
@@index_loaded = false
|
47
48
|
|
48
|
-
# Gets a Country by its ISO 3166 code. Raises an
|
49
|
-
# exception if it couldn't be found.
|
49
|
+
# Gets a Country by its ISO 3166-1 alpha-2 code. Raises an
|
50
|
+
# InvalidCountryCode exception if it couldn't be found.
|
50
51
|
def self.get(identifier)
|
51
52
|
instance = @@countries[identifier]
|
52
53
|
|
53
54
|
unless instance
|
54
|
-
|
55
|
-
info = Indexes::Countries.countries[identifier]
|
56
|
-
raise InvalidCountryCode.new, 'Invalid identifier' unless info
|
55
|
+
info = data_source.load_country_info(identifier)
|
57
56
|
instance = Country.new(info)
|
58
57
|
@@countries[identifier] = instance
|
59
58
|
end
|
@@ -75,17 +74,15 @@ module TZInfo
|
|
75
74
|
|
76
75
|
# Returns an Array of all the valid country codes.
|
77
76
|
def self.all_codes
|
78
|
-
|
79
|
-
Indexes::Countries.countries.keys
|
77
|
+
data_source.country_codes
|
80
78
|
end
|
81
79
|
|
82
80
|
# Returns an Array of all the defined Countries.
|
83
81
|
def self.all
|
84
|
-
|
85
|
-
Indexes::Countries.countries.keys.collect {|code| get(code)}
|
82
|
+
data_source.country_codes.collect {|code| get(code)}
|
86
83
|
end
|
87
84
|
|
88
|
-
# The ISO 3166 country code.
|
85
|
+
# The ISO 3166-1 alpha-2 country code.
|
89
86
|
def code
|
90
87
|
@info.code
|
91
88
|
end
|
@@ -107,8 +104,9 @@ module TZInfo
|
|
107
104
|
|
108
105
|
# Returns a frozen array of all the zone identifiers for the country. These
|
109
106
|
# are in an order that
|
110
|
-
#
|
111
|
-
#
|
107
|
+
#
|
108
|
+
# 1. makes some geographical sense, and
|
109
|
+
# 2. puts the most populous zones first, where that does not contradict 1.
|
112
110
|
def zone_identifiers
|
113
111
|
@info.zone_identifiers
|
114
112
|
end
|
@@ -118,8 +116,9 @@ module TZInfo
|
|
118
116
|
# objects to avoid the overhead of loading Timezone definitions until
|
119
117
|
# a conversion is actually required. The Timezones are returned in an order
|
120
118
|
# that
|
121
|
-
#
|
122
|
-
#
|
119
|
+
#
|
120
|
+
# 1. makes some geographical sense, and
|
121
|
+
# 2. puts the most populous zones first, where that does not contradict 1.
|
123
122
|
def zones
|
124
123
|
zone_identifiers.collect {|id|
|
125
124
|
Timezone.get_proxy(id)
|
@@ -129,18 +128,16 @@ module TZInfo
|
|
129
128
|
# Returns a frozen array of all the timezones for the for the country as
|
130
129
|
# CountryTimezone instances (containing extra information about each zone).
|
131
130
|
# These are in an order that
|
132
|
-
#
|
133
|
-
#
|
131
|
+
#
|
132
|
+
# 1. makes some geographical sense, and
|
133
|
+
# 2. puts the most populous zones first, where that does not contradict 1.
|
134
134
|
def zone_info
|
135
135
|
@info.zones
|
136
136
|
end
|
137
137
|
|
138
138
|
# Compare two Countries based on their code. Returns -1 if c is less
|
139
139
|
# than self, 0 if c is equal to self and +1 if c is greater than self.
|
140
|
-
#
|
141
|
-
# Returns nil if c is not comparable with Country instances.
|
142
140
|
def <=>(c)
|
143
|
-
return nil unless c.is_a?(Country)
|
144
141
|
code <=> c.code
|
145
142
|
end
|
146
143
|
|
@@ -166,18 +163,15 @@ module TZInfo
|
|
166
163
|
end
|
167
164
|
|
168
165
|
private
|
169
|
-
# Loads in the index of countries if it hasn't already been loaded.
|
170
|
-
def self.load_index
|
171
|
-
unless @@index_loaded
|
172
|
-
require 'tzinfo/indexes/countries'
|
173
|
-
@@index_loaded = true
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
166
|
# Called by Country.new to initialize a new Country instance. The info
|
178
167
|
# parameter is a CountryInfo that defines the country.
|
179
168
|
def setup(info)
|
180
169
|
@info = info
|
181
170
|
end
|
171
|
+
|
172
|
+
# Returns the current DataSource
|
173
|
+
def self.data_source
|
174
|
+
DataSource.get
|
175
|
+
end
|
182
176
|
end
|
183
177
|
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
|
@@ -23,8 +23,6 @@
|
|
23
23
|
module TZInfo
|
24
24
|
# The country index file includes CountryIndexDefinition which provides
|
25
25
|
# a country method used to define each country in the index.
|
26
|
-
#
|
27
|
-
# @private
|
28
26
|
module CountryIndexDefinition #:nodoc:
|
29
27
|
def self.append_features(base)
|
30
28
|
super
|
@@ -32,15 +30,12 @@ module TZInfo
|
|
32
30
|
base.instance_eval { @countries = {} }
|
33
31
|
end
|
34
32
|
|
35
|
-
# Class methods for inclusion.
|
36
|
-
#
|
37
|
-
# @private
|
38
33
|
module ClassMethods #:nodoc:
|
39
34
|
# Defines a country with an ISO 3166 country code, name and block. The
|
40
35
|
# block will be evaluated to obtain all the timezones for the country.
|
41
36
|
# Calls Country.country_defined with the definition of each country.
|
42
37
|
def country(code, name, &block)
|
43
|
-
@countries[code] =
|
38
|
+
@countries[code] = RubyCountryInfo.new(code, name, &block)
|
44
39
|
end
|
45
40
|
|
46
41
|
# Returns a frozen hash of all the countries that have been defined in
|
data/lib/tzinfo/country_info.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 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
|
@@ -21,43 +21,19 @@
|
|
21
21
|
#++
|
22
22
|
|
23
23
|
module TZInfo
|
24
|
-
#
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
class CountryInfo #:nodoc:
|
24
|
+
# Represents a country and references to its timezones as returned by a
|
25
|
+
# DataSource.
|
26
|
+
class CountryInfo
|
27
|
+
# The ISO 3166 country code.
|
29
28
|
attr_reader :code
|
29
|
+
|
30
|
+
# The name of the country.
|
30
31
|
attr_reader :name
|
31
32
|
|
32
|
-
# Constructs a new CountryInfo with an ISO 3166 country code
|
33
|
-
|
34
|
-
# (when they are first needed).
|
35
|
-
def initialize(code, name, &block)
|
33
|
+
# Constructs a new CountryInfo with an ISO 3166 country code and name
|
34
|
+
def initialize(code, name)
|
36
35
|
@code = code
|
37
36
|
@name = name
|
38
|
-
@block = block
|
39
|
-
@zones = nil
|
40
|
-
@zone_identifiers = nil
|
41
|
-
end
|
42
|
-
|
43
|
-
# Called by the index data to define a timezone for the country.
|
44
|
-
def timezone(identifier, latitude_numerator, latitude_denominator,
|
45
|
-
longitude_numerator, longitude_denominator, description = nil)
|
46
|
-
# Currently only store the identifiers.
|
47
|
-
@zones << CountryTimezone.new(identifier, latitude_numerator,
|
48
|
-
latitude_denominator, longitude_numerator, longitude_denominator,
|
49
|
-
description)
|
50
|
-
end
|
51
|
-
|
52
|
-
# Returns a frozen array of all the zone identifiers for the country. These
|
53
|
-
# are in the order they were added using the timezone method.
|
54
|
-
def zone_identifiers
|
55
|
-
unless @zone_identifiers
|
56
|
-
@zone_identifiers = zones.collect {|zone| zone.identifier}
|
57
|
-
@zone_identifiers.freeze
|
58
|
-
end
|
59
|
-
|
60
|
-
@zone_identifiers
|
61
37
|
end
|
62
38
|
|
63
39
|
# Returns internal object state as a programmer-readable string.
|
@@ -65,18 +41,18 @@ module TZInfo
|
|
65
41
|
"#<#{self.class}: #@code>"
|
66
42
|
end
|
67
43
|
|
44
|
+
# Returns a frozen array of all the zone identifiers for the country.
|
45
|
+
# The identifiers are ordered by importance according to the DataSource.
|
46
|
+
def zone_identifiers
|
47
|
+
raise NotImplementedError, 'Subclasses must override zone_identifiers'
|
48
|
+
end
|
49
|
+
|
68
50
|
# Returns a frozen array of all the timezones for the for the country as
|
69
|
-
# CountryTimezone instances.
|
70
|
-
#
|
51
|
+
# CountryTimezone instances.
|
52
|
+
#
|
53
|
+
# The timezones are ordered by importance according to the DataSource.
|
71
54
|
def zones
|
72
|
-
|
73
|
-
|
74
|
-
@block.call(self) if @block
|
75
|
-
@block = nil
|
76
|
-
@zones.freeze
|
77
|
-
end
|
78
|
-
|
79
|
-
@zones
|
80
|
-
end
|
55
|
+
raise NotImplementedError, 'Subclasses must override zone_identifiers'
|
56
|
+
end
|
81
57
|
end
|
82
58
|
end
|