tzinfo 0.1.2 → 0.2.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.
- data/CHANGES +24 -0
- data/LICENSE +1 -1
- data/Rakefile +5 -1
- data/lib/tzinfo/countries/AD.rb +12 -12
- data/lib/tzinfo/countries/AE.rb +12 -12
- data/lib/tzinfo/countries/AF.rb +12 -12
- data/lib/tzinfo/countries/AG.rb +12 -12
- data/lib/tzinfo/countries/AI.rb +12 -12
- data/lib/tzinfo/countries/AL.rb +12 -12
- data/lib/tzinfo/countries/AM.rb +12 -12
- data/lib/tzinfo/countries/AN.rb +12 -12
- data/lib/tzinfo/countries/AO.rb +12 -12
- data/lib/tzinfo/countries/AQ.rb +21 -21
- data/lib/tzinfo/countries/AR.rb +21 -21
- data/lib/tzinfo/countries/AS.rb +12 -12
- data/lib/tzinfo/countries/AT.rb +12 -12
- data/lib/tzinfo/countries/AU.rb +22 -22
- data/lib/tzinfo/countries/AW.rb +12 -12
- data/lib/tzinfo/countries/AX.rb +12 -12
- data/lib/tzinfo/countries/AZ.rb +12 -12
- data/lib/tzinfo/countries/BA.rb +12 -12
- data/lib/tzinfo/countries/BB.rb +12 -12
- data/lib/tzinfo/countries/BD.rb +12 -12
- data/lib/tzinfo/countries/BE.rb +12 -12
- data/lib/tzinfo/countries/BF.rb +12 -12
- data/lib/tzinfo/countries/BG.rb +12 -12
- data/lib/tzinfo/countries/BH.rb +12 -12
- data/lib/tzinfo/countries/BI.rb +12 -12
- data/lib/tzinfo/countries/BJ.rb +12 -12
- data/lib/tzinfo/countries/BM.rb +12 -12
- data/lib/tzinfo/countries/BN.rb +12 -12
- data/lib/tzinfo/countries/BO.rb +12 -12
- data/lib/tzinfo/countries/BR.rb +26 -26
- data/lib/tzinfo/countries/BS.rb +12 -12
- data/lib/tzinfo/countries/BT.rb +12 -12
- data/lib/tzinfo/countries/BV.rb +11 -11
- data/lib/tzinfo/countries/BW.rb +12 -12
- data/lib/tzinfo/countries/BY.rb +12 -12
- data/lib/tzinfo/countries/BZ.rb +12 -12
- data/lib/tzinfo/countries/CA.rb +36 -36
- data/lib/tzinfo/countries/CC.rb +12 -12
- data/lib/tzinfo/countries/CD.rb +13 -13
- data/lib/tzinfo/countries/CF.rb +12 -12
- data/lib/tzinfo/countries/CG.rb +12 -12
- data/lib/tzinfo/countries/CH.rb +12 -12
- data/lib/tzinfo/countries/CI.rb +12 -12
- data/lib/tzinfo/countries/CK.rb +12 -12
- data/lib/tzinfo/countries/CL.rb +13 -13
- data/lib/tzinfo/countries/CM.rb +12 -12
- data/lib/tzinfo/countries/CN.rb +16 -16
- data/lib/tzinfo/countries/CO.rb +12 -12
- data/lib/tzinfo/countries/CR.rb +12 -12
- data/lib/tzinfo/countries/CS.rb +12 -12
- data/lib/tzinfo/countries/CU.rb +12 -12
- data/lib/tzinfo/countries/CV.rb +12 -12
- data/lib/tzinfo/countries/CX.rb +12 -12
- data/lib/tzinfo/countries/CY.rb +12 -12
- data/lib/tzinfo/countries/CZ.rb +12 -12
- data/lib/tzinfo/countries/DE.rb +12 -12
- data/lib/tzinfo/countries/DJ.rb +12 -12
- data/lib/tzinfo/countries/DK.rb +12 -12
- data/lib/tzinfo/countries/DM.rb +12 -12
- data/lib/tzinfo/countries/DO.rb +12 -12
- data/lib/tzinfo/countries/DZ.rb +12 -12
- data/lib/tzinfo/countries/EC.rb +13 -13
- data/lib/tzinfo/countries/EE.rb +12 -12
- data/lib/tzinfo/countries/EG.rb +12 -12
- data/lib/tzinfo/countries/EH.rb +12 -12
- data/lib/tzinfo/countries/ER.rb +12 -12
- data/lib/tzinfo/countries/ES.rb +14 -14
- data/lib/tzinfo/countries/ET.rb +12 -12
- data/lib/tzinfo/countries/FI.rb +12 -12
- data/lib/tzinfo/countries/FJ.rb +12 -12
- data/lib/tzinfo/countries/FK.rb +12 -12
- data/lib/tzinfo/countries/FM.rb +14 -14
- data/lib/tzinfo/countries/FO.rb +12 -12
- data/lib/tzinfo/countries/FR.rb +12 -12
- data/lib/tzinfo/countries/GA.rb +12 -12
- data/lib/tzinfo/countries/GB.rb +12 -12
- data/lib/tzinfo/countries/GD.rb +12 -12
- data/lib/tzinfo/countries/GE.rb +12 -12
- data/lib/tzinfo/countries/GF.rb +12 -12
- data/lib/tzinfo/countries/GH.rb +12 -12
- data/lib/tzinfo/countries/GI.rb +12 -12
- data/lib/tzinfo/countries/GL.rb +15 -15
- data/lib/tzinfo/countries/GM.rb +12 -12
- data/lib/tzinfo/countries/GN.rb +12 -12
- data/lib/tzinfo/countries/GP.rb +12 -12
- data/lib/tzinfo/countries/GQ.rb +12 -12
- data/lib/tzinfo/countries/GR.rb +12 -12
- data/lib/tzinfo/countries/GS.rb +12 -12
- data/lib/tzinfo/countries/GT.rb +12 -12
- data/lib/tzinfo/countries/GU.rb +12 -12
- data/lib/tzinfo/countries/GW.rb +12 -12
- data/lib/tzinfo/countries/GY.rb +12 -12
- data/lib/tzinfo/countries/HK.rb +12 -12
- data/lib/tzinfo/countries/HM.rb +11 -11
- data/lib/tzinfo/countries/HN.rb +12 -12
- data/lib/tzinfo/countries/HR.rb +12 -12
- data/lib/tzinfo/countries/HT.rb +12 -12
- data/lib/tzinfo/countries/HU.rb +12 -12
- data/lib/tzinfo/countries/ID.rb +15 -15
- data/lib/tzinfo/countries/IE.rb +12 -12
- data/lib/tzinfo/countries/IL.rb +12 -12
- data/lib/tzinfo/countries/IN.rb +12 -12
- data/lib/tzinfo/countries/IO.rb +12 -12
- data/lib/tzinfo/countries/IQ.rb +12 -12
- data/lib/tzinfo/countries/IR.rb +12 -12
- data/lib/tzinfo/countries/IS.rb +12 -12
- data/lib/tzinfo/countries/IT.rb +12 -12
- data/lib/tzinfo/countries/JM.rb +12 -12
- data/lib/tzinfo/countries/JO.rb +12 -12
- data/lib/tzinfo/countries/JP.rb +12 -12
- data/lib/tzinfo/countries/KE.rb +12 -12
- data/lib/tzinfo/countries/KG.rb +12 -12
- data/lib/tzinfo/countries/KH.rb +12 -12
- data/lib/tzinfo/countries/KI.rb +14 -14
- data/lib/tzinfo/countries/KM.rb +12 -12
- data/lib/tzinfo/countries/KN.rb +12 -12
- data/lib/tzinfo/countries/KP.rb +12 -12
- data/lib/tzinfo/countries/KR.rb +12 -12
- data/lib/tzinfo/countries/KW.rb +12 -12
- data/lib/tzinfo/countries/KY.rb +12 -12
- data/lib/tzinfo/countries/KZ.rb +16 -16
- data/lib/tzinfo/countries/LA.rb +12 -12
- data/lib/tzinfo/countries/LB.rb +12 -12
- data/lib/tzinfo/countries/LC.rb +12 -12
- data/lib/tzinfo/countries/LI.rb +12 -12
- data/lib/tzinfo/countries/LK.rb +12 -12
- data/lib/tzinfo/countries/LR.rb +12 -12
- data/lib/tzinfo/countries/LS.rb +12 -12
- data/lib/tzinfo/countries/LT.rb +12 -12
- data/lib/tzinfo/countries/LU.rb +12 -12
- data/lib/tzinfo/countries/LV.rb +12 -12
- data/lib/tzinfo/countries/LY.rb +12 -12
- data/lib/tzinfo/countries/MA.rb +12 -12
- data/lib/tzinfo/countries/MC.rb +12 -12
- data/lib/tzinfo/countries/MD.rb +12 -12
- data/lib/tzinfo/countries/MG.rb +12 -12
- data/lib/tzinfo/countries/MH.rb +13 -13
- data/lib/tzinfo/countries/MK.rb +12 -12
- data/lib/tzinfo/countries/ML.rb +12 -12
- data/lib/tzinfo/countries/MM.rb +12 -12
- data/lib/tzinfo/countries/MN.rb +14 -14
- data/lib/tzinfo/countries/MO.rb +12 -12
- data/lib/tzinfo/countries/MP.rb +12 -12
- data/lib/tzinfo/countries/MQ.rb +12 -12
- data/lib/tzinfo/countries/MR.rb +12 -12
- data/lib/tzinfo/countries/MS.rb +12 -12
- data/lib/tzinfo/countries/MT.rb +12 -12
- data/lib/tzinfo/countries/MU.rb +12 -12
- data/lib/tzinfo/countries/MV.rb +12 -12
- data/lib/tzinfo/countries/MW.rb +12 -12
- data/lib/tzinfo/countries/MX.rb +19 -19
- data/lib/tzinfo/countries/MY.rb +13 -13
- data/lib/tzinfo/countries/MZ.rb +12 -12
- data/lib/tzinfo/countries/NA.rb +12 -12
- data/lib/tzinfo/countries/NC.rb +12 -12
- data/lib/tzinfo/countries/NE.rb +12 -12
- data/lib/tzinfo/countries/NF.rb +12 -12
- data/lib/tzinfo/countries/NG.rb +12 -12
- data/lib/tzinfo/countries/NI.rb +12 -12
- data/lib/tzinfo/countries/NL.rb +12 -12
- data/lib/tzinfo/countries/NO.rb +12 -12
- data/lib/tzinfo/countries/NP.rb +12 -12
- data/lib/tzinfo/countries/NR.rb +12 -12
- data/lib/tzinfo/countries/NU.rb +12 -12
- data/lib/tzinfo/countries/NZ.rb +13 -13
- data/lib/tzinfo/countries/OM.rb +12 -12
- data/lib/tzinfo/countries/PA.rb +12 -12
- data/lib/tzinfo/countries/PE.rb +12 -12
- data/lib/tzinfo/countries/PF.rb +14 -14
- data/lib/tzinfo/countries/PG.rb +12 -12
- data/lib/tzinfo/countries/PH.rb +12 -12
- data/lib/tzinfo/countries/PK.rb +12 -12
- data/lib/tzinfo/countries/PL.rb +12 -12
- data/lib/tzinfo/countries/PM.rb +12 -12
- data/lib/tzinfo/countries/PN.rb +12 -12
- data/lib/tzinfo/countries/PR.rb +12 -12
- data/lib/tzinfo/countries/PS.rb +12 -12
- data/lib/tzinfo/countries/PT.rb +14 -14
- data/lib/tzinfo/countries/PW.rb +12 -12
- data/lib/tzinfo/countries/PY.rb +12 -12
- data/lib/tzinfo/countries/QA.rb +12 -12
- data/lib/tzinfo/countries/RE.rb +12 -12
- data/lib/tzinfo/countries/RO.rb +12 -12
- data/lib/tzinfo/countries/RU.rb +25 -25
- data/lib/tzinfo/countries/RW.rb +12 -12
- data/lib/tzinfo/countries/SA.rb +12 -12
- data/lib/tzinfo/countries/SB.rb +12 -12
- data/lib/tzinfo/countries/SC.rb +12 -12
- data/lib/tzinfo/countries/SD.rb +12 -12
- data/lib/tzinfo/countries/SE.rb +12 -12
- data/lib/tzinfo/countries/SG.rb +12 -12
- data/lib/tzinfo/countries/SH.rb +12 -12
- data/lib/tzinfo/countries/SI.rb +12 -12
- data/lib/tzinfo/countries/SJ.rb +13 -13
- data/lib/tzinfo/countries/SK.rb +12 -12
- data/lib/tzinfo/countries/SL.rb +12 -12
- data/lib/tzinfo/countries/SM.rb +12 -12
- data/lib/tzinfo/countries/SN.rb +12 -12
- data/lib/tzinfo/countries/SO.rb +12 -12
- data/lib/tzinfo/countries/SR.rb +12 -12
- data/lib/tzinfo/countries/ST.rb +12 -12
- data/lib/tzinfo/countries/SV.rb +12 -12
- data/lib/tzinfo/countries/SY.rb +12 -12
- data/lib/tzinfo/countries/SZ.rb +12 -12
- data/lib/tzinfo/countries/TC.rb +12 -12
- data/lib/tzinfo/countries/TD.rb +12 -12
- data/lib/tzinfo/countries/TF.rb +12 -12
- data/lib/tzinfo/countries/TG.rb +12 -12
- data/lib/tzinfo/countries/TH.rb +12 -12
- data/lib/tzinfo/countries/TJ.rb +12 -12
- data/lib/tzinfo/countries/TK.rb +12 -12
- data/lib/tzinfo/countries/TL.rb +12 -12
- data/lib/tzinfo/countries/TM.rb +12 -12
- data/lib/tzinfo/countries/TN.rb +12 -12
- data/lib/tzinfo/countries/TO.rb +12 -12
- data/lib/tzinfo/countries/TR.rb +12 -12
- data/lib/tzinfo/countries/TT.rb +12 -12
- data/lib/tzinfo/countries/TV.rb +12 -12
- data/lib/tzinfo/countries/TW.rb +12 -12
- data/lib/tzinfo/countries/TZ.rb +12 -12
- data/lib/tzinfo/countries/UA.rb +15 -15
- data/lib/tzinfo/countries/UG.rb +12 -12
- data/lib/tzinfo/countries/UM.rb +14 -14
- data/lib/tzinfo/countries/US.rb +36 -35
- data/lib/tzinfo/countries/UY.rb +12 -12
- data/lib/tzinfo/countries/UZ.rb +13 -13
- data/lib/tzinfo/countries/VA.rb +12 -12
- data/lib/tzinfo/countries/VC.rb +12 -12
- data/lib/tzinfo/countries/VE.rb +12 -12
- data/lib/tzinfo/countries/VG.rb +12 -12
- data/lib/tzinfo/countries/VI.rb +12 -12
- data/lib/tzinfo/countries/VN.rb +12 -12
- data/lib/tzinfo/countries/VU.rb +12 -12
- data/lib/tzinfo/countries/WF.rb +12 -12
- data/lib/tzinfo/countries/WS.rb +12 -12
- data/lib/tzinfo/countries/YE.rb +12 -12
- data/lib/tzinfo/countries/YT.rb +12 -12
- data/lib/tzinfo/countries/ZA.rb +12 -12
- data/lib/tzinfo/countries/ZM.rb +12 -12
- data/lib/tzinfo/countries/ZW.rb +12 -12
- data/lib/tzinfo/definitions/Africa/Abidjan.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Accra.rb +27 -27
- data/lib/tzinfo/definitions/Africa/Addis_Ababa.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Algiers.rb +46 -46
- data/lib/tzinfo/definitions/Africa/Asmera.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Bamako.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Bangui.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Banjul.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Bissau.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Blantyre.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Brazzaville.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Bujumbura.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Cairo.rb +213 -203
- data/lib/tzinfo/definitions/Africa/Casablanca.rb +31 -31
- data/lib/tzinfo/definitions/Africa/Ceuta.rb +164 -157
- data/lib/tzinfo/definitions/Africa/Conakry.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Dakar.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Dar_es_Salaam.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Djibouti.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Douala.rb +13 -13
- data/lib/tzinfo/definitions/Africa/El_Aaiun.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Freetown.rb +43 -43
- data/lib/tzinfo/definitions/Africa/Gaborone.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Harare.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Johannesburg.rb +18 -18
- data/lib/tzinfo/definitions/Africa/Kampala.rb +16 -16
- data/lib/tzinfo/definitions/Africa/Khartoum.rb +46 -46
- data/lib/tzinfo/definitions/Africa/Kigali.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Kinshasa.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Lagos.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Libreville.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Lome.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Luanda.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Lubumbashi.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Lusaka.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Malabo.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Maputo.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Maseru.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Mbabane.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Mogadishu.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Monrovia.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Nairobi.rb +16 -16
- data/lib/tzinfo/definitions/Africa/Ndjamena.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Niamey.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Nouakchott.rb +15 -15
- data/lib/tzinfo/definitions/Africa/Ouagadougou.rb +13 -13
- data/lib/tzinfo/definitions/Africa/Porto__m__Novo.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Sao_Tome.rb +14 -14
- data/lib/tzinfo/definitions/Africa/Timbuktu.rb +11 -11
- data/lib/tzinfo/definitions/Africa/Tripoli.rb +41 -41
- data/lib/tzinfo/definitions/Africa/Tunis.rb +130 -40
- data/lib/tzinfo/definitions/Africa/Windhoek.rb +130 -121
- data/lib/tzinfo/definitions/America/Adak.rb +183 -175
- data/lib/tzinfo/definitions/America/Anchorage.rb +183 -175
- data/lib/tzinfo/definitions/America/Anguilla.rb +13 -13
- data/lib/tzinfo/definitions/America/Antigua.rb +14 -14
- data/lib/tzinfo/definitions/America/Araguaina.rb +61 -64
- data/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +71 -71
- data/lib/tzinfo/definitions/America/Argentina/Catamarca.rb +73 -73
- data/lib/tzinfo/definitions/America/Argentina/ComodRivadavia.rb +13 -13
- data/lib/tzinfo/definitions/America/Argentina/Cordoba.rb +71 -71
- data/lib/tzinfo/definitions/America/Argentina/Jujuy.rb +71 -72
- data/lib/tzinfo/definitions/America/Argentina/La_Rioja.rb +74 -74
- data/lib/tzinfo/definitions/America/Argentina/Mendoza.rb +73 -73
- data/lib/tzinfo/definitions/America/Argentina/Rio_Gallegos.rb +73 -73
- data/lib/tzinfo/definitions/America/Argentina/San_Juan.rb +74 -74
- data/lib/tzinfo/definitions/America/Argentina/Tucuman.rb +73 -73
- data/lib/tzinfo/definitions/America/Argentina/Ushuaia.rb +73 -73
- data/lib/tzinfo/definitions/America/Aruba.rb +14 -14
- data/lib/tzinfo/definitions/America/Asuncion.rb +166 -157
- data/lib/tzinfo/definitions/America/Atka.rb +11 -11
- data/lib/tzinfo/definitions/America/Bahia.rb +71 -72
- data/lib/tzinfo/definitions/America/Barbados.rb +22 -22
- data/lib/tzinfo/definitions/America/Belem.rb +41 -42
- data/lib/tzinfo/definitions/America/Belize.rb +67 -67
- data/lib/tzinfo/definitions/America/Boa_Vista.rb +45 -47
- data/lib/tzinfo/definitions/America/Bogota.rb +16 -16
- data/lib/tzinfo/definitions/America/Boise.rb +189 -178
- data/lib/tzinfo/definitions/America/Buenos_Aires.rb +11 -11
- data/lib/tzinfo/definitions/America/Cambridge_Bay.rb +165 -154
- data/lib/tzinfo/definitions/America/Campo_Grande.rb +165 -156
- data/lib/tzinfo/definitions/America/Cancun.rb +125 -115
- data/lib/tzinfo/definitions/America/Caracas.rb +15 -15
- data/lib/tzinfo/definitions/America/Catamarca.rb +11 -11
- data/lib/tzinfo/definitions/America/Cayenne.rb +14 -14
- data/lib/tzinfo/definitions/America/Cayman.rb +14 -14
- data/lib/tzinfo/definitions/America/Chicago.rb +274 -267
- data/lib/tzinfo/definitions/America/Chihuahua.rb +128 -120
- data/lib/tzinfo/definitions/America/Coral_Harbour.rb +20 -20
- data/lib/tzinfo/definitions/America/Cordoba.rb +11 -11
- data/lib/tzinfo/definitions/America/Costa_Rica.rb +22 -22
- data/lib/tzinfo/definitions/America/Cuiaba.rb +163 -156
- data/lib/tzinfo/definitions/America/Curacao.rb +14 -14
- data/lib/tzinfo/definitions/America/Danmarkshavn.rb +46 -46
- data/lib/tzinfo/definitions/America/Dawson.rb +165 -154
- data/lib/tzinfo/definitions/America/Dawson_Creek.rb +70 -70
- data/lib/tzinfo/definitions/America/Denver.rb +196 -189
- data/lib/tzinfo/definitions/America/Detroit.rb +177 -169
- data/lib/tzinfo/definitions/America/Dominica.rb +13 -13
- data/lib/tzinfo/definitions/America/Edmonton.rb +192 -181
- data/lib/tzinfo/definitions/America/Eirunepe.rb +43 -46
- data/lib/tzinfo/definitions/America/El_Salvador.rb +17 -17
- data/lib/tzinfo/definitions/America/Ensenada.rb +11 -11
- data/lib/tzinfo/definitions/America/Fort_Wayne.rb +11 -11
- data/lib/tzinfo/definitions/America/Fortaleza.rb +51 -55
- data/lib/tzinfo/definitions/America/Glace_Bay.rb +178 -171
- data/lib/tzinfo/definitions/America/Godthab.rb +155 -145
- data/lib/tzinfo/definitions/America/Goose_Bay.rb +242 -236
- data/lib/tzinfo/definitions/America/Grand_Turk.rb +158 -148
- data/lib/tzinfo/definitions/America/Grenada.rb +13 -13
- data/lib/tzinfo/definitions/America/Guadeloupe.rb +13 -13
- data/lib/tzinfo/definitions/America/Guatemala.rb +19 -19
- data/lib/tzinfo/definitions/America/Guayaquil.rb +14 -14
- data/lib/tzinfo/definitions/America/Guyana.rb +16 -16
- data/lib/tzinfo/definitions/America/Halifax.rb +266 -259
- data/lib/tzinfo/definitions/America/Havana.rb +194 -184
- data/lib/tzinfo/definitions/America/Hermosillo.rb +27 -28
- data/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb +139 -134
- data/lib/tzinfo/definitions/America/Indiana/Knox.rb +194 -184
- data/lib/tzinfo/definitions/America/Indiana/Marengo.rb +143 -136
- data/lib/tzinfo/definitions/America/Indiana/Petersburg.rb +156 -146
- data/lib/tzinfo/definitions/America/Indiana/Vevay.rb +121 -113
- data/lib/tzinfo/definitions/America/Indiana/Vincennes.rb +141 -133
- data/lib/tzinfo/definitions/America/Indianapolis.rb +11 -11
- data/lib/tzinfo/definitions/America/Inuvik.rb +165 -154
- data/lib/tzinfo/definitions/America/Iqaluit.rb +164 -153
- data/lib/tzinfo/definitions/America/Jamaica.rb +34 -34
- data/lib/tzinfo/definitions/America/Jujuy.rb +11 -11
- data/lib/tzinfo/definitions/America/Juneau.rb +182 -174
- data/lib/tzinfo/definitions/America/Kentucky/Louisville.rb +218 -211
- data/lib/tzinfo/definitions/America/Kentucky/Monticello.rb +188 -179
- data/lib/tzinfo/definitions/America/Knox_IN.rb +11 -11
- data/lib/tzinfo/definitions/America/La_Paz.rb +15 -15
- data/lib/tzinfo/definitions/America/Lima.rb +28 -28
- data/lib/tzinfo/definitions/America/Los_Angeles.rb +224 -215
- data/lib/tzinfo/definitions/America/Louisville.rb +11 -11
- data/lib/tzinfo/definitions/America/Maceio.rb +53 -59
- data/lib/tzinfo/definitions/America/Managua.rb +26 -26
- data/lib/tzinfo/definitions/America/Manaus.rb +43 -46
- data/lib/tzinfo/definitions/America/Martinique.rb +16 -16
- data/lib/tzinfo/definitions/America/Mazatlan.rb +131 -121
- data/lib/tzinfo/definitions/America/Mendoza.rb +11 -11
- data/lib/tzinfo/definitions/America/Menominee.rb +181 -171
- data/lib/tzinfo/definitions/America/Merida.rb +125 -115
- data/lib/tzinfo/definitions/America/Mexico_City.rb +136 -127
- data/lib/tzinfo/definitions/America/Miquelon.rb +142 -133
- data/lib/tzinfo/definitions/America/Moncton.rb +245 -239
- data/lib/tzinfo/definitions/America/Monterrey.rb +125 -117
- data/lib/tzinfo/definitions/America/Montevideo.rb +81 -80
- data/lib/tzinfo/definitions/America/Montreal.rb +271 -264
- data/lib/tzinfo/definitions/America/Montserrat.rb +13 -13
- data/lib/tzinfo/definitions/America/Nassau.rb +187 -177
- data/lib/tzinfo/definitions/America/New_York.rb +274 -267
- data/lib/tzinfo/definitions/America/Nipigon.rb +173 -162
- data/lib/tzinfo/definitions/America/Nome.rb +183 -175
- data/lib/tzinfo/definitions/America/Noronha.rb +51 -55
- data/lib/tzinfo/definitions/America/North_Dakota/Center.rb +190 -179
- data/lib/tzinfo/definitions/America/North_Dakota/New_Salem.rb +190 -0
- data/lib/tzinfo/definitions/America/Panama.rb +14 -14
- data/lib/tzinfo/definitions/America/Pangnirtung.rb +164 -153
- data/lib/tzinfo/definitions/America/Paramaribo.rb +17 -17
- data/lib/tzinfo/definitions/America/Phoenix.rb +23 -25
- data/lib/tzinfo/definitions/America/Port__m__au__m__Prince.rb +46 -46
- data/lib/tzinfo/definitions/America/Port_of_Spain.rb +13 -13
- data/lib/tzinfo/definitions/America/Porto_Acre.rb +11 -11
- data/lib/tzinfo/definitions/America/Porto_Velho.rb +41 -42
- data/lib/tzinfo/definitions/America/Puerto_Rico.rb +16 -15
- data/lib/tzinfo/definitions/America/Rainy_River.rb +173 -162
- data/lib/tzinfo/definitions/America/Rankin_Inlet.rb +164 -153
- data/lib/tzinfo/definitions/America/Recife.rb +51 -55
- data/lib/tzinfo/definitions/America/Regina.rb +65 -64
- data/lib/tzinfo/definitions/America/Rio_Branco.rb +41 -42
- data/lib/tzinfo/definitions/America/Rosario.rb +11 -11
- data/lib/tzinfo/definitions/America/Santiago.rb +195 -186
- data/lib/tzinfo/definitions/America/Santo_Domingo.rb +29 -29
- data/lib/tzinfo/definitions/America/Sao_Paulo.rb +165 -157
- data/lib/tzinfo/definitions/America/Scoresbysund.rb +155 -145
- data/lib/tzinfo/definitions/America/Shiprock.rb +11 -11
- data/lib/tzinfo/definitions/America/St_Johns.rb +277 -270
- data/lib/tzinfo/definitions/America/St_Kitts.rb +13 -13
- data/lib/tzinfo/definitions/America/St_Lucia.rb +14 -14
- data/lib/tzinfo/definitions/America/St_Thomas.rb +13 -13
- data/lib/tzinfo/definitions/America/St_Vincent.rb +14 -14
- data/lib/tzinfo/definitions/America/Swift_Current.rb +35 -34
- data/lib/tzinfo/definitions/America/Tegucigalpa.rb +17 -17
- data/lib/tzinfo/definitions/America/Thule.rb +133 -123
- data/lib/tzinfo/definitions/America/Thunder_Bay.rb +177 -170
- data/lib/tzinfo/definitions/America/Tijuana.rb +187 -182
- data/lib/tzinfo/definitions/America/Toronto.rb +271 -263
- data/lib/tzinfo/definitions/America/Tortola.rb +13 -13
- data/lib/tzinfo/definitions/America/Vancouver.rb +228 -217
- data/lib/tzinfo/definitions/America/Virgin.rb +11 -11
- data/lib/tzinfo/definitions/America/Whitehorse.rb +165 -154
- data/lib/tzinfo/definitions/America/Winnipeg.rb +224 -213
- data/lib/tzinfo/definitions/America/Yakutat.rb +182 -174
- data/lib/tzinfo/definitions/America/Yellowknife.rb +164 -153
- data/lib/tzinfo/definitions/Antarctica/Casey.rb +13 -13
- data/lib/tzinfo/definitions/Antarctica/Davis.rb +15 -15
- data/lib/tzinfo/definitions/Antarctica/DumontDUrville.rb +15 -15
- data/lib/tzinfo/definitions/Antarctica/Mawson.rb +13 -13
- data/lib/tzinfo/definitions/Antarctica/McMurdo.rb +165 -156
- data/lib/tzinfo/definitions/Antarctica/Palmer.rb +168 -158
- data/lib/tzinfo/definitions/Antarctica/Rothera.rb +13 -13
- data/lib/tzinfo/definitions/Antarctica/South_Pole.rb +11 -11
- data/lib/tzinfo/definitions/Antarctica/Syowa.rb +13 -13
- data/lib/tzinfo/definitions/Antarctica/Vostok.rb +13 -13
- data/lib/tzinfo/definitions/Arctic/Longyearbyen.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Aden.rb +13 -13
- data/lib/tzinfo/definitions/Asia/Almaty.rb +60 -63
- data/lib/tzinfo/definitions/Asia/Amman.rb +157 -147
- data/lib/tzinfo/definitions/Asia/Anadyr.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Aqtau.rb +62 -63
- data/lib/tzinfo/definitions/Asia/Aqtobe.rb +61 -63
- data/lib/tzinfo/definitions/Asia/Ashgabat.rb +38 -38
- data/lib/tzinfo/definitions/Asia/Ashkhabad.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Baghdad.rb +152 -142
- data/lib/tzinfo/definitions/Asia/Bahrain.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Baku.rb +149 -141
- data/lib/tzinfo/definitions/Asia/Bangkok.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Beirut.rb +179 -169
- data/lib/tzinfo/definitions/Asia/Bishkek.rb +64 -63
- data/lib/tzinfo/definitions/Asia/Brunei.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Calcutta.rb +17 -17
- data/lib/tzinfo/definitions/Asia/Choibalsan.rb +146 -136
- data/lib/tzinfo/definitions/Asia/Chongqing.rb +26 -26
- data/lib/tzinfo/definitions/Asia/Chungking.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Colombo.rb +20 -19
- data/lib/tzinfo/definitions/Asia/Dacca.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Damascus.rb +189 -179
- data/lib/tzinfo/definitions/Asia/Dhaka.rb +18 -18
- data/lib/tzinfo/definitions/Asia/Dili.rb +17 -17
- data/lib/tzinfo/definitions/Asia/Dubai.rb +13 -13
- data/lib/tzinfo/definitions/Asia/Dushanbe.rb +36 -36
- data/lib/tzinfo/definitions/Asia/Gaza.rb +182 -173
- data/lib/tzinfo/definitions/Asia/Harbin.rb +29 -29
- data/lib/tzinfo/definitions/Asia/Hong_Kong.rb +81 -81
- data/lib/tzinfo/definitions/Asia/Hovd.rb +146 -136
- data/lib/tzinfo/definitions/Asia/Irkutsk.rb +156 -146
- data/lib/tzinfo/definitions/Asia/Istanbul.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Jakarta.rb +20 -20
- data/lib/tzinfo/definitions/Asia/Jayapura.rb +15 -15
- data/lib/tzinfo/definitions/Asia/Jerusalem.rb +155 -155
- data/lib/tzinfo/definitions/Asia/Kabul.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Kamchatka.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Karachi.rb +19 -19
- data/lib/tzinfo/definitions/Asia/Kashgar.rb +27 -27
- data/lib/tzinfo/definitions/Asia/Katmandu.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb +20 -20
- data/lib/tzinfo/definitions/Asia/Kuching.rb +31 -31
- data/lib/tzinfo/definitions/Asia/Kuwait.rb +13 -13
- data/lib/tzinfo/definitions/Asia/Macao.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Macau.rb +54 -54
- data/lib/tzinfo/definitions/Asia/Magadan.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Makassar.rb +16 -16
- data/lib/tzinfo/definitions/Asia/Manila.rb +22 -22
- data/lib/tzinfo/definitions/Asia/Muscat.rb +13 -13
- data/lib/tzinfo/definitions/Asia/Nicosia.rb +165 -156
- data/lib/tzinfo/definitions/Asia/Novosibirsk.rb +156 -146
- data/lib/tzinfo/definitions/Asia/Omsk.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Oral.rb +62 -63
- data/lib/tzinfo/definitions/Asia/Phnom_Penh.rb +16 -16
- data/lib/tzinfo/definitions/Asia/Pontianak.rb +20 -20
- data/lib/tzinfo/definitions/Asia/Pyongyang.rb +18 -18
- data/lib/tzinfo/definitions/Asia/Qatar.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Qyzylorda.rb +62 -64
- data/lib/tzinfo/definitions/Asia/Rangoon.rb +16 -16
- data/lib/tzinfo/definitions/Asia/Riyadh.rb +13 -13
- data/lib/tzinfo/definitions/Asia/Riyadh87.rb +348 -0
- data/lib/tzinfo/definitions/Asia/Riyadh88.rb +349 -0
- data/lib/tzinfo/definitions/Asia/Riyadh89.rb +349 -0
- data/lib/tzinfo/definitions/Asia/Saigon.rb +16 -16
- data/lib/tzinfo/definitions/Asia/Sakhalin.rb +156 -146
- data/lib/tzinfo/definitions/Asia/Samarkand.rb +37 -41
- data/lib/tzinfo/definitions/Asia/Seoul.rb +25 -25
- data/lib/tzinfo/definitions/Asia/Shanghai.rb +29 -30
- data/lib/tzinfo/definitions/Asia/Singapore.rb +21 -21
- data/lib/tzinfo/definitions/Asia/Taipei.rb +53 -53
- data/lib/tzinfo/definitions/Asia/Tashkent.rb +37 -41
- data/lib/tzinfo/definitions/Asia/Tbilisi.rb +65 -67
- data/lib/tzinfo/definitions/Asia/Tehran.rb +52 -116
- data/lib/tzinfo/definitions/Asia/Tel_Aviv.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Thimbu.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Thimphu.rb +14 -14
- data/lib/tzinfo/definitions/Asia/Tokyo.rb +23 -23
- data/lib/tzinfo/definitions/Asia/Ujung_Pandang.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb +146 -136
- data/lib/tzinfo/definitions/Asia/Ulan_Bator.rb +11 -11
- data/lib/tzinfo/definitions/Asia/Urumqi.rb +26 -26
- data/lib/tzinfo/definitions/Asia/Vientiane.rb +16 -16
- data/lib/tzinfo/definitions/Asia/Vladivostok.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Yakutsk.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Yekaterinburg.rb +155 -145
- data/lib/tzinfo/definitions/Asia/Yerevan.rb +153 -144
- data/lib/tzinfo/definitions/Atlantic/Azores.rb +259 -249
- data/lib/tzinfo/definitions/Atlantic/Bermuda.rb +167 -157
- data/lib/tzinfo/definitions/Atlantic/Canary.rb +156 -147
- data/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb +16 -16
- data/lib/tzinfo/definitions/Atlantic/Faeroe.rb +153 -144
- data/lib/tzinfo/definitions/Atlantic/Jan_Mayen.rb +11 -11
- data/lib/tzinfo/definitions/Atlantic/Madeira.rb +259 -249
- data/lib/tzinfo/definitions/Atlantic/Reykjavik.rb +77 -77
- data/lib/tzinfo/definitions/Atlantic/South_Georgia.rb +13 -13
- data/lib/tzinfo/definitions/Atlantic/St_Helena.rb +14 -14
- data/lib/tzinfo/definitions/Atlantic/Stanley.rb +161 -152
- data/lib/tzinfo/definitions/Australia/ACT.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Adelaide.rb +180 -172
- data/lib/tzinfo/definitions/Australia/Brisbane.rb +29 -30
- data/lib/tzinfo/definitions/Australia/Broken_Hill.rb +181 -174
- data/lib/tzinfo/definitions/Australia/Canberra.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Currie.rb +179 -172
- data/lib/tzinfo/definitions/Australia/Darwin.rb +22 -22
- data/lib/tzinfo/definitions/Australia/Hobart.rb +187 -180
- data/lib/tzinfo/definitions/Australia/LHI.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Lindeman.rb +33 -35
- data/lib/tzinfo/definitions/Australia/Lord_Howe.rb +152 -143
- data/lib/tzinfo/definitions/Australia/Melbourne.rb +179 -171
- data/lib/tzinfo/definitions/Australia/NSW.rb +11 -11
- data/lib/tzinfo/definitions/Australia/North.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Perth.rb +25 -26
- data/lib/tzinfo/definitions/Australia/Queensland.rb +11 -11
- data/lib/tzinfo/definitions/Australia/South.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Sydney.rb +179 -171
- data/lib/tzinfo/definitions/Australia/Tasmania.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Victoria.rb +11 -11
- data/lib/tzinfo/definitions/Australia/West.rb +11 -11
- data/lib/tzinfo/definitions/Australia/Yancowinna.rb +11 -11
- data/lib/tzinfo/definitions/Brazil/Acre.rb +11 -11
- data/lib/tzinfo/definitions/Brazil/DeNoronha.rb +11 -11
- data/lib/tzinfo/definitions/Brazil/East.rb +11 -11
- data/lib/tzinfo/definitions/Brazil/West.rb +11 -11
- data/lib/tzinfo/definitions/CET.rb +170 -160
- data/lib/tzinfo/definitions/CST6CDT.rb +185 -174
- data/lib/tzinfo/definitions/Canada/Atlantic.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Central.rb +11 -11
- data/lib/tzinfo/definitions/Canada/East__m__Saskatchewan.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Eastern.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Mountain.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Newfoundland.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Pacific.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Saskatchewan.rb +11 -11
- data/lib/tzinfo/definitions/Canada/Yukon.rb +11 -11
- data/lib/tzinfo/definitions/Chile/Continental.rb +11 -11
- data/lib/tzinfo/definitions/Chile/EasterIsland.rb +11 -11
- data/lib/tzinfo/definitions/Cuba.rb +9 -9
- data/lib/tzinfo/definitions/EET.rb +158 -148
- data/lib/tzinfo/definitions/EST.rb +10 -10
- data/lib/tzinfo/definitions/EST5EDT.rb +185 -174
- data/lib/tzinfo/definitions/Egypt.rb +9 -9
- data/lib/tzinfo/definitions/Eire.rb +9 -9
- data/lib/tzinfo/definitions/Etc/GMT.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT0.rb +11 -11
- data/lib/tzinfo/definitions/Etc/GMT__m__0.rb +11 -11
- data/lib/tzinfo/definitions/Etc/GMT__m__1.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__10.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__11.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__12.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__13.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__14.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__2.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__3.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__4.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__5.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__6.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__7.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__8.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__m__9.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__0.rb +11 -11
- data/lib/tzinfo/definitions/Etc/GMT__p__1.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__10.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__11.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__12.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__2.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__3.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__4.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__5.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__6.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__7.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__8.rb +12 -12
- data/lib/tzinfo/definitions/Etc/GMT__p__9.rb +12 -12
- data/lib/tzinfo/definitions/Etc/Greenwich.rb +11 -11
- data/lib/tzinfo/definitions/Etc/UCT.rb +12 -12
- data/lib/tzinfo/definitions/Etc/UTC.rb +12 -12
- data/lib/tzinfo/definitions/Etc/Universal.rb +11 -11
- data/lib/tzinfo/definitions/Etc/Zulu.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Amsterdam.rb +218 -208
- data/lib/tzinfo/definitions/Europe/Andorra.rb +146 -136
- data/lib/tzinfo/definitions/Europe/Athens.rb +176 -167
- data/lib/tzinfo/definitions/Europe/Belfast.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Belgrade.rb +157 -147
- data/lib/tzinfo/definitions/Europe/Berlin.rb +181 -172
- data/lib/tzinfo/definitions/Europe/Bratislava.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Brussels.rb +223 -214
- data/lib/tzinfo/definitions/Europe/Bucharest.rb +174 -167
- data/lib/tzinfo/definitions/Europe/Budapest.rb +191 -181
- data/lib/tzinfo/definitions/Europe/Chisinau.rb +177 -170
- data/lib/tzinfo/definitions/Europe/Copenhagen.rb +172 -163
- data/lib/tzinfo/definitions/Europe/Dublin.rb +265 -257
- data/lib/tzinfo/definitions/Europe/Gibraltar.rb +236 -227
- data/lib/tzinfo/definitions/Europe/Helsinki.rb +156 -147
- data/lib/tzinfo/definitions/Europe/Istanbul.rb +209 -201
- data/lib/tzinfo/definitions/Europe/Kaliningrad.rb +169 -159
- data/lib/tzinfo/definitions/Europe/Kiev.rb +157 -149
- data/lib/tzinfo/definitions/Europe/Lisbon.rb +259 -250
- data/lib/tzinfo/definitions/Europe/Ljubljana.rb +11 -11
- data/lib/tzinfo/definitions/Europe/London.rb +279 -271
- data/lib/tzinfo/definitions/Europe/Luxembourg.rb +221 -211
- data/lib/tzinfo/definitions/Europe/Madrid.rb +202 -193
- data/lib/tzinfo/definitions/Europe/Malta.rb +207 -198
- data/lib/tzinfo/definitions/Europe/Mariehamn.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Minsk.rb +159 -147
- data/lib/tzinfo/definitions/Europe/Monaco.rb +223 -214
- data/lib/tzinfo/definitions/Europe/Moscow.rb +168 -158
- data/lib/tzinfo/definitions/Europe/Nicosia.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Oslo.rb +179 -169
- data/lib/tzinfo/definitions/Europe/Paris.rb +222 -212
- data/lib/tzinfo/definitions/Europe/Prague.rb +180 -170
- data/lib/tzinfo/definitions/Europe/Riga.rb +164 -156
- data/lib/tzinfo/definitions/Europe/Rome.rb +208 -200
- data/lib/tzinfo/definitions/Europe/Samara.rb +155 -145
- data/lib/tzinfo/definitions/Europe/San_Marino.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Sarajevo.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Simferopol.rb +159 -151
- data/lib/tzinfo/definitions/Europe/Skopje.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Sofia.rb +164 -157
- data/lib/tzinfo/definitions/Europe/Stockholm.rb +158 -149
- data/lib/tzinfo/definitions/Europe/Tallinn.rb +161 -152
- data/lib/tzinfo/definitions/Europe/Tirane.rb +171 -162
- data/lib/tzinfo/definitions/Europe/Tiraspol.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Uzhgorod.rb +158 -153
- data/lib/tzinfo/definitions/Europe/Vaduz.rb +153 -144
- data/lib/tzinfo/definitions/Europe/Vatican.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Vienna.rb +177 -170
- data/lib/tzinfo/definitions/Europe/Vilnius.rb +158 -148
- data/lib/tzinfo/definitions/Europe/Warsaw.rb +203 -195
- data/lib/tzinfo/definitions/Europe/Zagreb.rb +11 -11
- data/lib/tzinfo/definitions/Europe/Zaporozhye.rb +160 -150
- data/lib/tzinfo/definitions/Europe/Zurich.rb +160 -151
- data/lib/tzinfo/definitions/GB.rb +9 -9
- data/lib/tzinfo/definitions/GB__m__Eire.rb +9 -9
- data/lib/tzinfo/definitions/GMT.rb +9 -9
- data/lib/tzinfo/definitions/GMT0.rb +9 -9
- data/lib/tzinfo/definitions/GMT__m__0.rb +9 -9
- data/lib/tzinfo/definitions/GMT__p__0.rb +9 -9
- data/lib/tzinfo/definitions/Greenwich.rb +9 -9
- data/lib/tzinfo/definitions/HST.rb +10 -10
- data/lib/tzinfo/definitions/Hongkong.rb +9 -9
- data/lib/tzinfo/definitions/Iceland.rb +9 -9
- data/lib/tzinfo/definitions/Indian/Antananarivo.rb +15 -15
- data/lib/tzinfo/definitions/Indian/Chagos.rb +14 -14
- data/lib/tzinfo/definitions/Indian/Christmas.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Cocos.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Comoro.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Kerguelen.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Mahe.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Maldives.rb +14 -14
- data/lib/tzinfo/definitions/Indian/Mauritius.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Mayotte.rb +13 -13
- data/lib/tzinfo/definitions/Indian/Reunion.rb +13 -13
- data/lib/tzinfo/definitions/Iran.rb +9 -9
- data/lib/tzinfo/definitions/Israel.rb +9 -9
- data/lib/tzinfo/definitions/Jamaica.rb +9 -9
- data/lib/tzinfo/definitions/Japan.rb +9 -9
- data/lib/tzinfo/definitions/Kwajalein.rb +9 -9
- data/lib/tzinfo/definitions/Libya.rb +9 -9
- data/lib/tzinfo/definitions/MET.rb +170 -160
- data/lib/tzinfo/definitions/MST.rb +10 -10
- data/lib/tzinfo/definitions/MST7MDT.rb +185 -174
- data/lib/tzinfo/definitions/Mexico/BajaNorte.rb +11 -11
- data/lib/tzinfo/definitions/Mexico/BajaSur.rb +11 -11
- data/lib/tzinfo/definitions/Mexico/General.rb +11 -11
- data/lib/tzinfo/definitions/Mideast/Riyadh87.rb +11 -0
- data/lib/tzinfo/definitions/Mideast/Riyadh88.rb +11 -0
- data/lib/tzinfo/definitions/Mideast/Riyadh89.rb +11 -0
- data/lib/tzinfo/definitions/NZ.rb +9 -9
- data/lib/tzinfo/definitions/NZ__m__CHAT.rb +9 -9
- data/lib/tzinfo/definitions/Navajo.rb +9 -9
- data/lib/tzinfo/definitions/PRC.rb +9 -9
- data/lib/tzinfo/definitions/PST8PDT.rb +185 -174
- data/lib/tzinfo/definitions/Pacific/Apia.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Auckland.rb +192 -184
- data/lib/tzinfo/definitions/Pacific/Chatham.rb +165 -156
- data/lib/tzinfo/definitions/Pacific/Easter.rb +182 -174
- data/lib/tzinfo/definitions/Pacific/Efate.rb +33 -33
- data/lib/tzinfo/definitions/Pacific/Enderbury.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Fakaofo.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Fiji.rb +17 -17
- data/lib/tzinfo/definitions/Pacific/Funafuti.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Galapagos.rb +14 -14
- data/lib/tzinfo/definitions/Pacific/Gambier.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Guadalcanal.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Guam.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Honolulu.rb +19 -17
- data/lib/tzinfo/definitions/Pacific/Johnston.rb +12 -12
- data/lib/tzinfo/definitions/Pacific/Kiritimati.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Kosrae.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Kwajalein.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Majuro.rb +14 -14
- data/lib/tzinfo/definitions/Pacific/Marquesas.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Midway.rb +17 -17
- data/lib/tzinfo/definitions/Pacific/Nauru.rb +16 -16
- data/lib/tzinfo/definitions/Pacific/Niue.rb +15 -15
- data/lib/tzinfo/definitions/Pacific/Norfolk.rb +14 -14
- data/lib/tzinfo/definitions/Pacific/Noumea.rb +19 -19
- data/lib/tzinfo/definitions/Pacific/Pago_Pago.rb +17 -17
- data/lib/tzinfo/definitions/Pacific/Palau.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Pitcairn.rb +14 -14
- data/lib/tzinfo/definitions/Pacific/Ponape.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Port_Moresby.rb +14 -14
- data/lib/tzinfo/definitions/Pacific/Rarotonga.rb +39 -39
- data/lib/tzinfo/definitions/Pacific/Saipan.rb +16 -16
- data/lib/tzinfo/definitions/Pacific/Samoa.rb +11 -11
- data/lib/tzinfo/definitions/Pacific/Tahiti.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Tarawa.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Tongatapu.rb +20 -21
- data/lib/tzinfo/definitions/Pacific/Truk.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Wake.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Wallis.rb +13 -13
- data/lib/tzinfo/definitions/Pacific/Yap.rb +11 -11
- data/lib/tzinfo/definitions/Poland.rb +9 -9
- data/lib/tzinfo/definitions/Portugal.rb +9 -9
- data/lib/tzinfo/definitions/ROC.rb +9 -9
- data/lib/tzinfo/definitions/ROK.rb +9 -9
- data/lib/tzinfo/definitions/Singapore.rb +9 -9
- data/lib/tzinfo/definitions/Turkey.rb +9 -9
- data/lib/tzinfo/definitions/UCT.rb +9 -9
- data/lib/tzinfo/definitions/US/Alaska.rb +11 -11
- data/lib/tzinfo/definitions/US/Aleutian.rb +11 -11
- data/lib/tzinfo/definitions/US/Arizona.rb +11 -11
- data/lib/tzinfo/definitions/US/Central.rb +11 -11
- data/lib/tzinfo/definitions/US/East__m__Indiana.rb +11 -11
- data/lib/tzinfo/definitions/US/Eastern.rb +11 -11
- data/lib/tzinfo/definitions/US/Hawaii.rb +11 -11
- data/lib/tzinfo/definitions/US/Indiana__m__Starke.rb +11 -11
- data/lib/tzinfo/definitions/US/Michigan.rb +11 -11
- data/lib/tzinfo/definitions/US/Mountain.rb +11 -11
- data/lib/tzinfo/definitions/US/Pacific.rb +11 -11
- data/lib/tzinfo/definitions/US/Pacific__m__New.rb +11 -11
- data/lib/tzinfo/definitions/US/Samoa.rb +11 -11
- data/lib/tzinfo/definitions/UTC.rb +9 -9
- data/lib/tzinfo/definitions/Universal.rb +9 -9
- data/lib/tzinfo/definitions/WET.rb +158 -148
- data/lib/tzinfo/definitions/W__m__SU.rb +9 -9
- data/lib/tzinfo/definitions/Zulu.rb +9 -9
- data/lib/tzinfo/offset_rationals.rb +95 -0
- data/lib/tzinfo/time_or_datetime.rb +269 -0
- data/lib/tzinfo/timezone.rb +25 -44
- data/lib/tzinfo/timezone_period.rb +54 -87
- data/lib/tzinfo/timezone_period_list.rb +7 -2
- data/lib/tzinfo/tzdataparser.rb +378 -325
- data/test/tc_offset_rationals.rb +25 -0
- data/test/tc_time_or_datetime.rb +386 -0
- data/test/tc_timezone.rb +43 -7
- data/test/tc_timezone_london.rb +61 -1
- data/test/tc_timezone_melbourne.rb +61 -1
- data/test/tc_timezone_new_york.rb +61 -1
- data/test/tc_timezone_period.rb +152 -65
- data/test/ts_all.rb +4 -0
- metadata +14 -2
@@ -1,9 +1,9 @@
|
|
1
|
-
require 'tzinfo/timezone'
|
2
|
-
require 'tzinfo/definitions/Europe/Moscow'
|
3
|
-
module TZInfo
|
4
|
-
module Definitions #:nodoc:
|
5
|
-
class W__m__SU < Definitions::Europe::Moscow #:nodoc:
|
6
|
-
set_identifier('W-SU')
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
1
|
+
require 'tzinfo/timezone'
|
2
|
+
require 'tzinfo/definitions/Europe/Moscow'
|
3
|
+
module TZInfo
|
4
|
+
module Definitions #:nodoc:
|
5
|
+
class W__m__SU < Definitions::Europe::Moscow #:nodoc:
|
6
|
+
set_identifier('W-SU')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require 'tzinfo/timezone'
|
2
|
-
require 'tzinfo/definitions/Etc/UTC'
|
3
|
-
module TZInfo
|
4
|
-
module Definitions #:nodoc:
|
5
|
-
class Zulu < Definitions::Etc::UTC #:nodoc:
|
6
|
-
set_identifier('Zulu')
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
1
|
+
require 'tzinfo/timezone'
|
2
|
+
require 'tzinfo/definitions/Etc/UTC'
|
3
|
+
module TZInfo
|
4
|
+
module Definitions #:nodoc:
|
5
|
+
class Zulu < Definitions::Etc::UTC #:nodoc:
|
6
|
+
set_identifier('Zulu')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2006 Philip Ross
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
# of this software and associated documentation files (the "Software"), to deal
|
6
|
+
# in the Software without restriction, including without limitation the rights
|
7
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
# copies of the Software, and to permit persons to whom the Software is
|
9
|
+
# furnished to do so, subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
# THE SOFTWARE.
|
21
|
+
#++
|
22
|
+
|
23
|
+
module TZInfo
|
24
|
+
|
25
|
+
# Provides a method for getting Rationals for a timezone offset in seconds.
|
26
|
+
# Pre-reduced rationals are returned for all the half-hour intervals between
|
27
|
+
# -14 and +14 hours to avoid having to call gcd at runtime.
|
28
|
+
module OffsetRationals #:nodoc:
|
29
|
+
@@rational_cache = {
|
30
|
+
-50400 => Rational.new!(-7,12),
|
31
|
+
-48600 => Rational.new!(-9,16),
|
32
|
+
-46800 => Rational.new!(-13,24),
|
33
|
+
-45000 => Rational.new!(-25,48),
|
34
|
+
-43200 => Rational.new!(-1,2),
|
35
|
+
-41400 => Rational.new!(-23,48),
|
36
|
+
-39600 => Rational.new!(-11,24),
|
37
|
+
-37800 => Rational.new!(-7,16),
|
38
|
+
-36000 => Rational.new!(-5,12),
|
39
|
+
-34200 => Rational.new!(-19,48),
|
40
|
+
-32400 => Rational.new!(-3,8),
|
41
|
+
-30600 => Rational.new!(-17,48),
|
42
|
+
-28800 => Rational.new!(-1,3),
|
43
|
+
-27000 => Rational.new!(-5,16),
|
44
|
+
-25200 => Rational.new!(-7,24),
|
45
|
+
-23400 => Rational.new!(-13,48),
|
46
|
+
-21600 => Rational.new!(-1,4),
|
47
|
+
-19800 => Rational.new!(-11,48),
|
48
|
+
-18000 => Rational.new!(-5,24),
|
49
|
+
-16200 => Rational.new!(-3,16),
|
50
|
+
-14400 => Rational.new!(-1,6),
|
51
|
+
-12600 => Rational.new!(-7,48),
|
52
|
+
-10800 => Rational.new!(-1,8),
|
53
|
+
-9000 => Rational.new!(-5,48),
|
54
|
+
-7200 => Rational.new!(-1,12),
|
55
|
+
-5400 => Rational.new!(-1,16),
|
56
|
+
-3600 => Rational.new!(-1,24),
|
57
|
+
-1800 => Rational.new!(-1,48),
|
58
|
+
0 => Rational.new!(0,1),
|
59
|
+
1800 => Rational.new!(1,48),
|
60
|
+
3600 => Rational.new!(1,24),
|
61
|
+
5400 => Rational.new!(1,16),
|
62
|
+
7200 => Rational.new!(1,12),
|
63
|
+
9000 => Rational.new!(5,48),
|
64
|
+
10800 => Rational.new!(1,8),
|
65
|
+
12600 => Rational.new!(7,48),
|
66
|
+
14400 => Rational.new!(1,6),
|
67
|
+
16200 => Rational.new!(3,16),
|
68
|
+
18000 => Rational.new!(5,24),
|
69
|
+
19800 => Rational.new!(11,48),
|
70
|
+
21600 => Rational.new!(1,4),
|
71
|
+
23400 => Rational.new!(13,48),
|
72
|
+
25200 => Rational.new!(7,24),
|
73
|
+
27000 => Rational.new!(5,16),
|
74
|
+
28800 => Rational.new!(1,3),
|
75
|
+
30600 => Rational.new!(17,48),
|
76
|
+
32400 => Rational.new!(3,8),
|
77
|
+
34200 => Rational.new!(19,48),
|
78
|
+
36000 => Rational.new!(5,12),
|
79
|
+
37800 => Rational.new!(7,16),
|
80
|
+
39600 => Rational.new!(11,24),
|
81
|
+
41400 => Rational.new!(23,48),
|
82
|
+
43200 => Rational.new!(1,2),
|
83
|
+
45000 => Rational.new!(25,48),
|
84
|
+
46800 => Rational.new!(13,24),
|
85
|
+
48600 => Rational.new!(9,16),
|
86
|
+
50400 => Rational.new!(7,12)}
|
87
|
+
|
88
|
+
# Returns a Rational expressing the fraction of a day that offset in
|
89
|
+
# seconds represents (i.e. equivalent to Rational(offset, 86400)).
|
90
|
+
def rational_for_offset(offset)
|
91
|
+
@@rational_cache[offset] || Rational(offset, 86400)
|
92
|
+
end
|
93
|
+
module_function :rational_for_offset
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2006 Philip Ross
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
# of this software and associated documentation files (the "Software"), to deal
|
6
|
+
# in the Software without restriction, including without limitation the rights
|
7
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
# copies of the Software, and to permit persons to whom the Software is
|
9
|
+
# furnished to do so, subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
# THE SOFTWARE.
|
21
|
+
#++
|
22
|
+
|
23
|
+
require 'date'
|
24
|
+
require 'time'
|
25
|
+
require 'tzinfo/offset_rationals'
|
26
|
+
|
27
|
+
module TZInfo
|
28
|
+
# Used by TZInfo internally to represent either a Time, DateTime or integer
|
29
|
+
# timestamp (seconds since 1970-01-01 00:00:00).
|
30
|
+
class TimeOrDateTime #:nodoc:
|
31
|
+
include Comparable
|
32
|
+
|
33
|
+
# Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime
|
34
|
+
# or an integer. If using a Time, any time zone information is ignored.
|
35
|
+
def initialize(timeOrDateTime)
|
36
|
+
@time = nil
|
37
|
+
@datetime = nil
|
38
|
+
@timestamp = nil
|
39
|
+
|
40
|
+
if timeOrDateTime.is_a?(Time)
|
41
|
+
@time = timeOrDateTime
|
42
|
+
@time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec) unless @time.zone == 'UTC'
|
43
|
+
@orig = @time
|
44
|
+
elsif timeOrDateTime.is_a?(DateTime)
|
45
|
+
@datetime = timeOrDateTime
|
46
|
+
@orig = @datetime
|
47
|
+
else
|
48
|
+
@timestamp = timeOrDateTime.to_i
|
49
|
+
@orig = @timestamp
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Returns the time as a Time.
|
54
|
+
def to_time
|
55
|
+
if @time.nil?
|
56
|
+
if !@timestamp.nil?
|
57
|
+
@time = Time.at(@timestamp).utc
|
58
|
+
else
|
59
|
+
@time = Time.utc(year, mon, mday, hour, min, sec)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
@time
|
64
|
+
end
|
65
|
+
|
66
|
+
# Returns the time as a DateTime.
|
67
|
+
def to_datetime
|
68
|
+
if @datetime.nil?
|
69
|
+
@datetime = DateTime.new(year, mon, mday, hour, min, sec)
|
70
|
+
end
|
71
|
+
|
72
|
+
@datetime
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns the time as an integer timestamp.
|
76
|
+
def to_i
|
77
|
+
if @timestamp.nil?
|
78
|
+
@timestamp = to_time.to_i
|
79
|
+
end
|
80
|
+
|
81
|
+
@timestamp
|
82
|
+
end
|
83
|
+
|
84
|
+
# Returns the time as the original time passed to new.
|
85
|
+
def to_orig
|
86
|
+
@orig
|
87
|
+
end
|
88
|
+
|
89
|
+
# Returns a string representation of the TimeOrDateTime.
|
90
|
+
def to_s
|
91
|
+
if @orig.is_a?(Time)
|
92
|
+
"Time: #{@orig.to_s}"
|
93
|
+
elsif @orig.is_a?(DateTime)
|
94
|
+
"DateTime: #{@orig.to_s}"
|
95
|
+
else
|
96
|
+
"Timestamp: #{@orig.to_s}"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Returns the year.
|
101
|
+
def year
|
102
|
+
if !@time.nil?
|
103
|
+
@time.year
|
104
|
+
elsif !@datetime.nil?
|
105
|
+
@datetime.year
|
106
|
+
else
|
107
|
+
to_time.year
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Returns the month of the year (1..12).
|
112
|
+
def mon
|
113
|
+
if !@time.nil?
|
114
|
+
@time.mon
|
115
|
+
elsif !@datetime.nil?
|
116
|
+
@datetime.mon
|
117
|
+
else
|
118
|
+
to_time.mon
|
119
|
+
end
|
120
|
+
end
|
121
|
+
alias :month :mon
|
122
|
+
|
123
|
+
# Returns the day of the month (1..n).
|
124
|
+
def mday
|
125
|
+
if !@time.nil?
|
126
|
+
@time.mday
|
127
|
+
elsif !@datetime.nil?
|
128
|
+
@datetime.mday
|
129
|
+
else
|
130
|
+
to_time.mday
|
131
|
+
end
|
132
|
+
end
|
133
|
+
alias :day :mday
|
134
|
+
|
135
|
+
# Returns the hour of the day (0..23).
|
136
|
+
def hour
|
137
|
+
if !@time.nil?
|
138
|
+
@time.hour
|
139
|
+
elsif !@datetime.nil?
|
140
|
+
@datetime.hour
|
141
|
+
else
|
142
|
+
to_time.hour
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Returns the minute of the hour (0..59).
|
147
|
+
def min
|
148
|
+
if !@time.nil?
|
149
|
+
@time.min
|
150
|
+
elsif !@datetime.nil?
|
151
|
+
@datetime.min
|
152
|
+
else
|
153
|
+
to_time.min
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the second of the minute (0..60). (60 for a leap second).
|
158
|
+
def sec
|
159
|
+
if !@time.nil?
|
160
|
+
@time.sec
|
161
|
+
elsif !@datetime.nil?
|
162
|
+
@datetime.sec
|
163
|
+
else
|
164
|
+
to_time.sec
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Compares this TimeOrDateTime with another Time, DateTime, integer
|
169
|
+
# timestamp or TimeOrDateTime. Returns -1, 0 or +1 depending whether the
|
170
|
+
# receiver is less than, equal to, or greater than timeOrDateTime.
|
171
|
+
#
|
172
|
+
# Milliseconds and smaller units are ignored in the comparison.
|
173
|
+
def <=>(timeOrDateTime)
|
174
|
+
if timeOrDateTime.is_a?(TimeOrDateTime)
|
175
|
+
self <=> timeOrDateTime.orig
|
176
|
+
elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime)
|
177
|
+
# If either is a DateTime, assume it is there for a reason
|
178
|
+
# (i.e. for range).
|
179
|
+
to_datetime <=> TimeOrDateTime.wrap(timeOrDateTime).to_datetime
|
180
|
+
elsif timeOrDateTime.is_a?(Time)
|
181
|
+
to_time <=> timeOrDateTime
|
182
|
+
else
|
183
|
+
to_i <=> timeOrDateTime.to_i
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Adds a number of seconds to the TimeOrDateTime. Returns a new
|
188
|
+
# TimeOrDateTime, preserving what the original constructed type was.
|
189
|
+
# If the original type is a Time and the resulting calculation goes out of
|
190
|
+
# range for Times, then an exception will be raised by the Time class.
|
191
|
+
def +(seconds)
|
192
|
+
if seconds == 0
|
193
|
+
self
|
194
|
+
else
|
195
|
+
if @orig.is_a?(DateTime)
|
196
|
+
TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds))
|
197
|
+
else
|
198
|
+
# + defined for Time and integer timestamps
|
199
|
+
TimeOrDateTime.new(@orig + seconds)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Subtracts a number of seconds from the TimeOrDateTime. Returns a new
|
205
|
+
# TimeOrDateTime, preserving what the original constructed type was.
|
206
|
+
# If the original type is a Time and the resulting calculation goes out of
|
207
|
+
# range for Times, then an exception will be raised by the Time class.
|
208
|
+
def -(seconds)
|
209
|
+
self + (-seconds)
|
210
|
+
end
|
211
|
+
|
212
|
+
# Similar to the + operator, but for cases where adding would cause a
|
213
|
+
# timestamp or time to go out of the allowed range, converts to a DateTime
|
214
|
+
# based TimeOrDateTime.
|
215
|
+
def add_with_convert(seconds)
|
216
|
+
if seconds == 0
|
217
|
+
self
|
218
|
+
else
|
219
|
+
if @orig.is_a?(DateTime)
|
220
|
+
TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds))
|
221
|
+
else
|
222
|
+
# A Time or timestamp.
|
223
|
+
result = to_i + seconds
|
224
|
+
|
225
|
+
if result < 0 || result > 2147483647
|
226
|
+
result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds))
|
227
|
+
else
|
228
|
+
result = TimeOrDateTime.new(@orig + seconds)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# If no block is given, returns a TimeOrDateTime wrapping the given
|
235
|
+
# timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed
|
236
|
+
# and passed to the block. The result of the block must be a TimeOrDateTime.
|
237
|
+
# to_orig will be called on the result and the result of to_orig will be
|
238
|
+
# returned.
|
239
|
+
#
|
240
|
+
# timeOrDateTime can be a Time, DateTime, integer timestamp or TimeOrDateTime.
|
241
|
+
# If a TimeOrDateTime is passed in, no new TimeOrDateTime will be constructed,
|
242
|
+
# the passed in value will be used.
|
243
|
+
def self.wrap(timeOrDateTime)
|
244
|
+
t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime)
|
245
|
+
|
246
|
+
if block_given?
|
247
|
+
t = yield t
|
248
|
+
|
249
|
+
if timeOrDateTime.is_a?(TimeOrDateTime)
|
250
|
+
t
|
251
|
+
elsif timeOrDateTime.is_a?(Time)
|
252
|
+
t.to_time
|
253
|
+
elsif timeOrDateTime.is_a?(DateTime)
|
254
|
+
t.to_datetime
|
255
|
+
else
|
256
|
+
t.to_i
|
257
|
+
end
|
258
|
+
else
|
259
|
+
t
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
protected
|
264
|
+
# The time in the format it was originally constructed.
|
265
|
+
def orig
|
266
|
+
@orig
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
data/lib/tzinfo/timezone.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2005 Philip Ross
|
2
|
+
# Copyright (c) 2005-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
|
@@ -22,6 +22,7 @@
|
|
22
22
|
|
23
23
|
require 'date'
|
24
24
|
require 'tzinfo/country'
|
25
|
+
require 'tzinfo/time_or_datetime'
|
25
26
|
require 'tzinfo/timezone_period'
|
26
27
|
require 'tzinfo/timezone_period_list'
|
27
28
|
|
@@ -45,12 +46,16 @@ module TZInfo
|
|
45
46
|
|
46
47
|
# Timezone is the base class of all timezones. It provides a factory method
|
47
48
|
# get to access timezones by identifier. Once a specific Timezone has been
|
48
|
-
# retrieved, DateTimes and
|
49
|
-
# local time for the zone. For example:
|
49
|
+
# retrieved, DateTimes, Times and timestamps can be converted between the UTC
|
50
|
+
# and the local time for the zone. For example:
|
50
51
|
#
|
51
52
|
# tz = TZInfo::Timezone.get('America/New_York')
|
52
53
|
# puts tz.utc_to_local(DateTime.new(2005,8,29,15,35,0)).to_s
|
53
54
|
# puts tz.local_to_utc(Time.utc(2005,8,29,11,35,0)).to_s
|
55
|
+
# puts tz.utc_to_local(1125315300).to_s
|
56
|
+
#
|
57
|
+
# Each time conversion method returns an object of the same type it was
|
58
|
+
# passed.
|
54
59
|
#
|
55
60
|
# The timezone information all comes from the tz database
|
56
61
|
# (see http://www.twinsun.com/tz/tz-link.htm)
|
@@ -204,18 +209,18 @@ module TZInfo
|
|
204
209
|
end
|
205
210
|
|
206
211
|
# Returns the TimezonePeriod for the given UTC time. utc can either be
|
207
|
-
# a DateTime or
|
208
|
-
# treated as a UTC time).
|
212
|
+
# a DateTime, Time or integer timestamp (Time.to_i). Any timezone
|
213
|
+
# information in utc is ignored (it is treated as a UTC time).
|
209
214
|
#
|
210
215
|
# If no TimezonePeriod could be found, PeriodNotFound is raised.
|
211
|
-
def period_for_utc(utc)
|
212
|
-
utc = as_datetime(utc)
|
216
|
+
def period_for_utc(utc)
|
213
217
|
periods.period_for_utc(utc)
|
214
218
|
end
|
215
219
|
|
216
220
|
# Returns the TimezonePeriod for the given local time. local can either be
|
217
|
-
# a DateTime or
|
218
|
-
# treated as a time in the current
|
221
|
+
# a DateTime, Time or integer timestamp (Time.to_i). Any timezone
|
222
|
+
# information in local is ignored (it is treated as a time in the current
|
223
|
+
# timezone).
|
219
224
|
#
|
220
225
|
# Warning: There are local times that have no equivalent UTC times (e.g.
|
221
226
|
# in the transition from standard time to daylight savings time). There are
|
@@ -246,8 +251,7 @@ module TZInfo
|
|
246
251
|
# array of the periods that need to be resolved. The block can select and
|
247
252
|
# return a single period or return nil or an empty array
|
248
253
|
# to cause an AmbiguousTime exception to be raised.
|
249
|
-
def period_for_local(local, dst = nil)
|
250
|
-
local = as_datetime(local)
|
254
|
+
def period_for_local(local, dst = nil)
|
251
255
|
results = periods.periods_for_local(local)
|
252
256
|
|
253
257
|
# by this point, results must contain at least one period
|
@@ -282,17 +286,19 @@ module TZInfo
|
|
282
286
|
end
|
283
287
|
|
284
288
|
# Converts a time in UTC to the local timezone. utc can either be
|
285
|
-
# a DateTime or
|
286
|
-
# Any timezone information in utc is ignored (it is treated as
|
289
|
+
# a DateTime, Time or timestamp (Time.to_i). The returned time has the same
|
290
|
+
# type as utc. Any timezone information in utc is ignored (it is treated as
|
291
|
+
# a UTC time).
|
287
292
|
def utc_to_local(utc)
|
288
|
-
|
293
|
+
TimeOrDateTime.wrap(utc) {|utc|
|
289
294
|
period_for_utc(utc).to_local(utc)
|
290
295
|
}
|
291
296
|
end
|
292
297
|
|
293
298
|
# Converts a time in the local timezone to UTC. local can either be
|
294
|
-
# a DateTime or
|
295
|
-
# Any timezone information in local is ignored (it is treated
|
299
|
+
# a DateTime, Time or timestamp (Time.to_i). The returned time has the same
|
300
|
+
# type as local. Any timezone information in local is ignored (it is treated
|
301
|
+
# as a local time).
|
296
302
|
#
|
297
303
|
# Warning: There are local times that have no equivalent UTC times (e.g.
|
298
304
|
# in the transition from standard time to daylight savings time). There are
|
@@ -323,7 +329,7 @@ module TZInfo
|
|
323
329
|
# single period to use to convert the time or return nil or an empty array
|
324
330
|
# to cause an AmbiguousTime exception to be raised.
|
325
331
|
def local_to_utc(local, dst = nil)
|
326
|
-
|
332
|
+
TimeOrDateTime.wrap(local) {|local|
|
327
333
|
if block_given?
|
328
334
|
period = period_for_local(local, dst) {|periods| yield periods }
|
329
335
|
else
|
@@ -348,7 +354,8 @@ module TZInfo
|
|
348
354
|
# is the time, the second element is the period.
|
349
355
|
def current_period_and_time
|
350
356
|
utc = Time.now.utc
|
351
|
-
|
357
|
+
period = period_for_utc(utc)
|
358
|
+
[period.to_local(utc), period]
|
352
359
|
end
|
353
360
|
|
354
361
|
alias :current_time_and_period :current_period_and_time
|
@@ -401,32 +408,6 @@ module TZInfo
|
|
401
408
|
end
|
402
409
|
CODE
|
403
410
|
end
|
404
|
-
|
405
|
-
private
|
406
|
-
# If called with a Time, returns an equivalent DateTime; otherwise returns
|
407
|
-
# the datetime paramter.
|
408
|
-
def as_datetime(datetime)
|
409
|
-
if datetime.instance_of?(Time)
|
410
|
-
DateTime.new(datetime.year, datetime.mon, datetime.mday, datetime.hour, datetime.min, datetime.sec)
|
411
|
-
else
|
412
|
-
datetime
|
413
|
-
end
|
414
|
-
end
|
415
|
-
|
416
|
-
# Executes a block with a DateTime. If datetime is a Time it will be
|
417
|
-
# converted to a DateTime before yielding to the block and the result of
|
418
|
-
# the block will be converted back to a Time.
|
419
|
-
def run_on_datetime(datetime)
|
420
|
-
if datetime.instance_of?(Time)
|
421
|
-
datetime = DateTime.new(datetime.year, datetime.mon, datetime.mday, datetime.hour, datetime.min, datetime.sec)
|
422
|
-
result = yield datetime
|
423
|
-
|
424
|
-
# not necessarily utc, but pretend it is
|
425
|
-
Time.utc(result.year, result.mon, result.mday, result.hour, result.min, result.sec)
|
426
|
-
else
|
427
|
-
yield datetime
|
428
|
-
end
|
429
|
-
end
|
430
411
|
end
|
431
412
|
|
432
413
|
# A proxy class representing a timezone with a given identifier. It can be
|