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
data/test/tc_timezone_london.rb
CHANGED
@@ -50,5 +50,65 @@ class TCTimezoneLondon < Test::Unit::TestCase
|
|
50
50
|
assert_equal(0, tz.period_for_local(DateTime.new(2004,10,31,1,59,59), false).utc_total_offset)
|
51
51
|
assert_equal(3600, tz.period_for_local(DateTime.new(2004,10,31,1,0,0), true).utc_total_offset)
|
52
52
|
assert_equal(0, tz.period_for_local(DateTime.new(2004,10,31,1,0,0), false).utc_total_offset)
|
53
|
-
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_1961
|
56
|
+
#Europe/London Sun Mar 26 01:59:59 1961 UTC = Sun Mar 26 01:59:59 1961 GMT isdst=0 gmtoff=0
|
57
|
+
#Europe/London Sun Mar 26 02:00:00 1961 UTC = Sun Mar 26 03:00:00 1961 BST isdst=1 gmtoff=3600
|
58
|
+
#Europe/London Sun Oct 29 01:59:59 1961 UTC = Sun Oct 29 02:59:59 1961 BST isdst=1 gmtoff=3600
|
59
|
+
#Europe/London Sun Oct 29 02:00:00 1961 UTC = Sun Oct 29 02:00:00 1961 GMT isdst=0 gmtoff=0
|
60
|
+
|
61
|
+
tz = Timezone.get('Europe/London')
|
62
|
+
assert_equal(DateTime.new(1961,3,26,1,59,59), tz.utc_to_local(DateTime.new(1961,3,26,1,59,59)))
|
63
|
+
assert_equal(DateTime.new(1961,3,26,3,0,0), tz.utc_to_local(DateTime.new(1961,3,26,2,0,0)))
|
64
|
+
assert_equal(DateTime.new(1961,10,29,2,59,59), tz.utc_to_local(DateTime.new(1961,10,29,1,59,59)))
|
65
|
+
assert_equal(DateTime.new(1961,10,29,2,0,0), tz.utc_to_local(DateTime.new(1961,10,29,2,0,0)))
|
66
|
+
|
67
|
+
assert_equal(DateTime.new(1961,3,26,1,59,59), tz.local_to_utc(DateTime.new(1961,3,26,1,59,59)))
|
68
|
+
assert_equal(DateTime.new(1961,3,26,2,0,0), tz.local_to_utc(DateTime.new(1961,3,26,3,0,0)))
|
69
|
+
assert_equal(DateTime.new(1961,10,29,1,59,59), tz.local_to_utc(DateTime.new(1961,10,29,2,59,59), true))
|
70
|
+
assert_equal(DateTime.new(1961,10,29,2,59,59), tz.local_to_utc(DateTime.new(1961,10,29,2,59,59), false))
|
71
|
+
assert_equal(DateTime.new(1961,10,29,1,0,0), tz.local_to_utc(DateTime.new(1961,10,29,2,0,0), true))
|
72
|
+
assert_equal(DateTime.new(1961,10,29,2,0,0), tz.local_to_utc(DateTime.new(1961,10,29,2,0,0), false))
|
73
|
+
|
74
|
+
assert_raise(PeriodNotFound) { tz.local_to_utc(DateTime.new(1961,3,26,2,0,0)) }
|
75
|
+
assert_raise(AmbiguousTime) { tz.local_to_utc(DateTime.new(1961,10,29,2,0,0)) }
|
76
|
+
|
77
|
+
assert_equal(:GMT, tz.period_for_utc(DateTime.new(1961,3,26,1,59,59)).zone_identifier)
|
78
|
+
assert_equal(:BST, tz.period_for_utc(DateTime.new(1961,3,26,2,0,0)).zone_identifier)
|
79
|
+
assert_equal(:BST, tz.period_for_utc(DateTime.new(1961,10,29,1,59,59)).zone_identifier)
|
80
|
+
assert_equal(:GMT, tz.period_for_utc(DateTime.new(1961,10,29,2,0,0)).zone_identifier)
|
81
|
+
|
82
|
+
assert_equal(:GMT, tz.period_for_local(DateTime.new(1961,3,26,1,59,59)).zone_identifier)
|
83
|
+
assert_equal(:BST, tz.period_for_local(DateTime.new(1961,3,26,3,0,0)).zone_identifier)
|
84
|
+
assert_equal(:BST, tz.period_for_local(DateTime.new(1961,10,29,2,59,59), true).zone_identifier)
|
85
|
+
assert_equal(:GMT, tz.period_for_local(DateTime.new(1961,10,29,2,59,59), false).zone_identifier)
|
86
|
+
assert_equal(:BST, tz.period_for_local(DateTime.new(1961,10,29,2,0,0), true).zone_identifier)
|
87
|
+
assert_equal(:GMT, tz.period_for_local(DateTime.new(1961,10,29,2,0,0), false).zone_identifier)
|
88
|
+
|
89
|
+
assert_equal(0, tz.period_for_utc(DateTime.new(1961,3,26,1,59,59)).utc_total_offset)
|
90
|
+
assert_equal(3600, tz.period_for_utc(DateTime.new(1961,3,26,2,0,0)).utc_total_offset)
|
91
|
+
assert_equal(3600, tz.period_for_utc(DateTime.new(1961,10,29,1,59,59)).utc_total_offset)
|
92
|
+
assert_equal(0, tz.period_for_utc(DateTime.new(1961,10,29,2,0,0)).utc_total_offset)
|
93
|
+
|
94
|
+
assert_equal(0, tz.period_for_local(DateTime.new(1961,3,26,1,59,59)).utc_total_offset)
|
95
|
+
assert_equal(3600, tz.period_for_local(DateTime.new(1961,3,26,3,0,0)).utc_total_offset)
|
96
|
+
assert_equal(3600, tz.period_for_local(DateTime.new(1961,10,29,2,59,59), true).utc_total_offset)
|
97
|
+
assert_equal(0, tz.period_for_local(DateTime.new(1961,10,29,2,59,59), false).utc_total_offset)
|
98
|
+
assert_equal(3600, tz.period_for_local(DateTime.new(1961,10,29,2,0,0), true).utc_total_offset)
|
99
|
+
assert_equal(0, tz.period_for_local(DateTime.new(1961,10,29,2,0,0), false).utc_total_offset)
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_time_boundary
|
103
|
+
#Europe/London Sat Oct 26 23:00:00 1968 UTC = Sun Oct 27 00:00:00 1968 GMT isdst=0 gmtoff=3600
|
104
|
+
#Europe/London Sun Oct 31 01:59:59 1971 UTC = Sun Oct 31 02:59:59 1971 GMT isdst=0 gmtoff=3600
|
105
|
+
|
106
|
+
tz = Timezone.get('Europe/London')
|
107
|
+
assert_equal(DateTime.new(1970,1,1,1,0,0), tz.utc_to_local(DateTime.new(1970,1,1,0,0,0)))
|
108
|
+
assert_equal(DateTime.new(1970,1,1,0,0,0), tz.local_to_utc(DateTime.new(1970,1,1,1,0,0)))
|
109
|
+
assert_equal(Time.utc(1970,1,1,1,0,0), tz.utc_to_local(Time.utc(1970,1,1,0,0,0)))
|
110
|
+
assert_equal(Time.utc(1970,1,1,0,0,0), tz.local_to_utc(Time.utc(1970,1,1,1,0,0)))
|
111
|
+
assert_equal(3600, tz.utc_to_local(0))
|
112
|
+
assert_equal(0, tz.local_to_utc(3600))
|
113
|
+
end
|
54
114
|
end
|
@@ -50,5 +50,65 @@ class TCTimezoneMelbourne < Test::Unit::TestCase
|
|
50
50
|
assert_equal(36000, tz.period_for_local(DateTime.new(2004,3,28,2,0,0), false).utc_total_offset)
|
51
51
|
assert_equal(36000, tz.period_for_local(DateTime.new(2004,10,31,1,59,59)).utc_total_offset)
|
52
52
|
assert_equal(39600, tz.period_for_local(DateTime.new(2004,10,31,3,0,0)).utc_total_offset)
|
53
|
-
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_1942
|
56
|
+
#Australia/Melbourne Sat Mar 28 14:59:59 1942 UTC = Sun Mar 29 01:59:59 1942 EST isdst=1 gmtoff=39600
|
57
|
+
#Australia/Melbourne Sat Mar 28 15:00:00 1942 UTC = Sun Mar 29 01:00:00 1942 EST isdst=0 gmtoff=36000
|
58
|
+
#Australia/Melbourne Sat Sep 26 15:59:59 1942 UTC = Sun Sep 27 01:59:59 1942 EST isdst=0 gmtoff=36000
|
59
|
+
#Australia/Melbourne Sat Sep 26 16:00:00 1942 UTC = Sun Sep 27 03:00:00 1942 EST isdst=1 gmtoff=39600
|
60
|
+
|
61
|
+
tz = Timezone.get('Australia/Melbourne')
|
62
|
+
assert_equal(DateTime.new(1942,3,29,1,59,59), tz.utc_to_local(DateTime.new(1942,3,28,14,59,59)))
|
63
|
+
assert_equal(DateTime.new(1942,3,29,1,0,0), tz.utc_to_local(DateTime.new(1942,3,28,15,0,0)))
|
64
|
+
assert_equal(DateTime.new(1942,9,27,1,59,59), tz.utc_to_local(DateTime.new(1942,9,26,15,59,59)))
|
65
|
+
assert_equal(DateTime.new(1942,9,27,3,0,0), tz.utc_to_local(DateTime.new(1942,9,26,16,0,0)))
|
66
|
+
|
67
|
+
assert_equal(DateTime.new(1942,3,28,14,59,59), tz.local_to_utc(DateTime.new(1942,3,29,1,59,59), true))
|
68
|
+
assert_equal(DateTime.new(1942,3,28,15,59,59), tz.local_to_utc(DateTime.new(1942,3,29,1,59,59), false))
|
69
|
+
assert_equal(DateTime.new(1942,3,28,14,0,0), tz.local_to_utc(DateTime.new(1942,3,29,1,0,0), true))
|
70
|
+
assert_equal(DateTime.new(1942,3,28,15,0,0), tz.local_to_utc(DateTime.new(1942,3,29,1,0,0), false))
|
71
|
+
assert_equal(DateTime.new(1942,9,26,15,59,59), tz.local_to_utc(DateTime.new(1942,9,27,1,59,59)))
|
72
|
+
assert_equal(DateTime.new(1942,9,26,16,0,0), tz.local_to_utc(DateTime.new(1942,9,27,3,0,0)))
|
73
|
+
|
74
|
+
assert_raise(PeriodNotFound) { tz.local_to_utc(DateTime.new(1942,9,27,2,0,0)) }
|
75
|
+
assert_raise(AmbiguousTime) { tz.local_to_utc(DateTime.new(1942,3,29,1,0,0)) }
|
76
|
+
|
77
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1942,3,28,14,59,59)).zone_identifier)
|
78
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1942,3,28,15,0,0)).zone_identifier)
|
79
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1942,9,26,15,59,59)).zone_identifier)
|
80
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1942,9,26,16,0,0)).zone_identifier)
|
81
|
+
|
82
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,3,29,1,59,59), true).zone_identifier)
|
83
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,3,29,1,59,59), false).zone_identifier)
|
84
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,3,29,1,0,0), true).zone_identifier)
|
85
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,3,29,1,0,0), false).zone_identifier)
|
86
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,9,27,1,59,59)).zone_identifier)
|
87
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1942,9,27,3,0,0)).zone_identifier)
|
88
|
+
|
89
|
+
assert_equal(39600, tz.period_for_utc(DateTime.new(1942,3,28,14,59,59)).utc_total_offset)
|
90
|
+
assert_equal(36000, tz.period_for_utc(DateTime.new(1942,3,28,15,0,0)).utc_total_offset)
|
91
|
+
assert_equal(36000, tz.period_for_utc(DateTime.new(1942,9,26,15,59,59)).utc_total_offset)
|
92
|
+
assert_equal(39600, tz.period_for_utc(DateTime.new(1942,9,26,16,0,0)).utc_total_offset)
|
93
|
+
|
94
|
+
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,1,59,59), true).utc_total_offset)
|
95
|
+
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,1,59,59), false).utc_total_offset)
|
96
|
+
assert_equal(39600, tz.period_for_local(DateTime.new(1942,3,29,1,0,0), true).utc_total_offset)
|
97
|
+
assert_equal(36000, tz.period_for_local(DateTime.new(1942,3,29,1,0,0), false).utc_total_offset)
|
98
|
+
assert_equal(36000, tz.period_for_local(DateTime.new(1942,9,27,1,59,59)).utc_total_offset)
|
99
|
+
assert_equal(39600, tz.period_for_local(DateTime.new(1942,9,27,3,0,0)).utc_total_offset)
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_time_boundary
|
103
|
+
#Australia/Melbourne Sat Mar 25 15:00:00 1944 UTC = Sun Mar 26 01:00:00 1944 EST isdst=0 gmtoff=36000
|
104
|
+
#Australia/Melbourne Sat Oct 30 15:59:59 1971 UTC = Sun Oct 31 01:59:59 1971 EST isdst=0 gmtoff=36000
|
105
|
+
|
106
|
+
tz = Timezone.get('Australia/Melbourne')
|
107
|
+
assert_equal(DateTime.new(1970,1,1,10,0,0), tz.utc_to_local(DateTime.new(1970,1,1,0,0,0)))
|
108
|
+
assert_equal(DateTime.new(1970,1,1,0,0,0), tz.local_to_utc(DateTime.new(1970,1,1,10,0,0)))
|
109
|
+
assert_equal(Time.utc(1970,1,1,10,0,0), tz.utc_to_local(Time.utc(1970,1,1,0,0,0)))
|
110
|
+
assert_equal(Time.utc(1970,1,1,0,0,0), tz.local_to_utc(Time.utc(1970,1,1,10,0,0)))
|
111
|
+
assert_equal(36000, tz.utc_to_local(0))
|
112
|
+
assert_equal(0, tz.local_to_utc(36000))
|
113
|
+
end
|
54
114
|
end
|
@@ -50,5 +50,65 @@ class TCTimezoneNewYork < Test::Unit::TestCase
|
|
50
50
|
assert_equal(-18000, tz.period_for_local(DateTime.new(2004,10,31,1,59,59), false).utc_total_offset)
|
51
51
|
assert_equal(-14400, tz.period_for_local(DateTime.new(2004,10,31,1,0,0), true).utc_total_offset)
|
52
52
|
assert_equal(-18000, tz.period_for_local(DateTime.new(2004,10,31,1,0,0), false).utc_total_offset)
|
53
|
-
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_1957
|
56
|
+
#America/New_York Sun Apr 28 06:59:59 1957 UTC = Sun Apr 28 01:59:59 1957 EST isdst=0 gmtoff=-18000
|
57
|
+
#America/New_York Sun Apr 28 07:00:00 1957 UTC = Sun Apr 28 03:00:00 1957 EDT isdst=1 gmtoff=-14400
|
58
|
+
#America/New_York Sun Oct 27 05:59:59 1957 UTC = Sun Oct 27 01:59:59 1957 EDT isdst=1 gmtoff=-14400
|
59
|
+
#America/New_York Sun Oct 27 06:00:00 1957 UTC = Sun Oct 27 01:00:00 1957 EST isdst=0 gmtoff=-18000
|
60
|
+
|
61
|
+
tz = Timezone.get('America/New_York')
|
62
|
+
assert_equal(DateTime.new(1957,4,28,1,59,59), tz.utc_to_local(DateTime.new(1957,4,28,6,59,59)))
|
63
|
+
assert_equal(DateTime.new(1957,4,28,3,0,0), tz.utc_to_local(DateTime.new(1957,4,28,7,0,0)))
|
64
|
+
assert_equal(DateTime.new(1957,10,27,1,59,59), tz.utc_to_local(DateTime.new(1957,10,27,5,59,59)))
|
65
|
+
assert_equal(DateTime.new(1957,10,27,1,0,0), tz.utc_to_local(DateTime.new(1957,10,27,6,0,0)))
|
66
|
+
|
67
|
+
assert_equal(DateTime.new(1957,4,28,6,59,59), tz.local_to_utc(DateTime.new(1957,4,28,1,59,59)))
|
68
|
+
assert_equal(DateTime.new(1957,4,28,7,0,0), tz.local_to_utc(DateTime.new(1957,4,28,3,0,0)))
|
69
|
+
assert_equal(DateTime.new(1957,10,27,5,59,59), tz.local_to_utc(DateTime.new(1957,10,27,1,59,59), true))
|
70
|
+
assert_equal(DateTime.new(1957,10,27,6,59,59), tz.local_to_utc(DateTime.new(1957,10,27,1,59,59), false))
|
71
|
+
assert_equal(DateTime.new(1957,10,27,5,0,0), tz.local_to_utc(DateTime.new(1957,10,27,1,0,0), true))
|
72
|
+
assert_equal(DateTime.new(1957,10,27,6,0,0), tz.local_to_utc(DateTime.new(1957,10,27,1,0,0), false))
|
73
|
+
|
74
|
+
assert_raise(PeriodNotFound) { tz.local_to_utc(DateTime.new(1957,4,28,2,0,0)) }
|
75
|
+
assert_raise(AmbiguousTime) { tz.local_to_utc(DateTime.new(1957,10,27,1,0,0)) }
|
76
|
+
|
77
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1957,4,28,6,59,59)).zone_identifier)
|
78
|
+
assert_equal(:EDT, tz.period_for_utc(DateTime.new(1957,4,28,7,0,0)).zone_identifier)
|
79
|
+
assert_equal(:EDT, tz.period_for_utc(DateTime.new(1957,10,27,5,59,59)).zone_identifier)
|
80
|
+
assert_equal(:EST, tz.period_for_utc(DateTime.new(1957,10,27,6,0,0)).zone_identifier)
|
81
|
+
|
82
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1957,4,28,1,59,59)).zone_identifier)
|
83
|
+
assert_equal(:EDT, tz.period_for_local(DateTime.new(1957,4,28,3,0,0)).zone_identifier)
|
84
|
+
assert_equal(:EDT, tz.period_for_local(DateTime.new(1957,10,27,1,59,59), true).zone_identifier)
|
85
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1957,10,27,1,59,59), false).zone_identifier)
|
86
|
+
assert_equal(:EDT, tz.period_for_local(DateTime.new(1957,10,27,1,0,0), true).zone_identifier)
|
87
|
+
assert_equal(:EST, tz.period_for_local(DateTime.new(1957,10,27,1,0,0), false).zone_identifier)
|
88
|
+
|
89
|
+
assert_equal(-18000, tz.period_for_utc(DateTime.new(1957,4,28,6,59,59)).utc_total_offset)
|
90
|
+
assert_equal(-14400, tz.period_for_utc(DateTime.new(1957,4,28,7,0,0)).utc_total_offset)
|
91
|
+
assert_equal(-14400, tz.period_for_utc(DateTime.new(1957,10,27,5,59,59)).utc_total_offset)
|
92
|
+
assert_equal(-18000, tz.period_for_utc(DateTime.new(1957,10,27,6,0,0)).utc_total_offset)
|
93
|
+
|
94
|
+
assert_equal(-18000, tz.period_for_local(DateTime.new(1957,4,28,1,59,59)).utc_total_offset)
|
95
|
+
assert_equal(-14400, tz.period_for_local(DateTime.new(1957,4,28,3,0,0)).utc_total_offset)
|
96
|
+
assert_equal(-14400, tz.period_for_local(DateTime.new(1957,10,27,1,59,59), true).utc_total_offset)
|
97
|
+
assert_equal(-18000, tz.period_for_local(DateTime.new(1957,10,27,1,59,59), false).utc_total_offset)
|
98
|
+
assert_equal(-14400, tz.period_for_local(DateTime.new(1957,10,27,1,0,0), true).utc_total_offset)
|
99
|
+
assert_equal(-18000, tz.period_for_local(DateTime.new(1957,10,27,1,0,0), false).utc_total_offset)
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_time_boundary
|
103
|
+
#America/New_York Sun Oct 26 06:00:00 1969 UTC = Sun Oct 26 01:00:00 1969 EST isdst=0 gmtoff=-18000
|
104
|
+
#America/New_York Sun Apr 26 06:59:59 1970 UTC = Sun Apr 26 01:59:59 1970 EST isdst=0 gmtoff=-18000
|
105
|
+
|
106
|
+
tz = Timezone.get('America/New_York')
|
107
|
+
assert_equal(DateTime.new(1970,1,1,0,0,0), tz.utc_to_local(DateTime.new(1970,1,1,5,0,0)))
|
108
|
+
assert_equal(DateTime.new(1970,1,1,5,0,0), tz.local_to_utc(DateTime.new(1970,1,1,0,0,0)))
|
109
|
+
assert_equal(Time.utc(1970,1,1,0,0,0), tz.utc_to_local(Time.utc(1970,1,1,5,0,0)))
|
110
|
+
assert_equal(Time.utc(1970,1,1,5,0,0), tz.local_to_utc(Time.utc(1970,1,1,0,0,0)))
|
111
|
+
assert_equal(0, tz.utc_to_local(18000))
|
112
|
+
assert_equal(18000, tz.local_to_utc(0))
|
113
|
+
end
|
54
114
|
end
|
data/test/tc_timezone_period.rb
CHANGED
@@ -5,25 +5,52 @@ require 'tzinfo/timezone_period'
|
|
5
5
|
include TZInfo
|
6
6
|
|
7
7
|
class TCTimezonePeriod < Test::Unit::TestCase
|
8
|
-
def
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
assert_equal(DateTime.new(2005,1,
|
13
|
-
assert_equal(
|
14
|
-
assert_equal(
|
15
|
-
assert_equal(
|
16
|
-
assert_equal(
|
17
|
-
assert_equal(DateTime.new(
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
assert_equal(
|
24
|
-
assert_equal(
|
25
|
-
|
26
|
-
|
8
|
+
def test_initialize_datetime
|
9
|
+
p = TimezonePeriod.new(DateTime.new(2005,1,1,0,0,0), DateTime.new(2005,1,2,0,0,0), -7200, 3600, :TEST)
|
10
|
+
|
11
|
+
assert_equal(DateTime.new(2005,1,1,0,0,0), p.utc_start)
|
12
|
+
assert_equal(DateTime.new(2005,1,2,0,0,0), p.utc_end)
|
13
|
+
assert_equal(-7200, p.utc_offset)
|
14
|
+
assert_equal(3600, p.std_offset)
|
15
|
+
assert_equal(:TEST, p.zone_identifier)
|
16
|
+
assert_equal(DateTime.new(2004,12,31,23,0,0), p.local_start)
|
17
|
+
assert_equal(DateTime.new(2005,1,1,23,0,0), p.local_end)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_initialize_time
|
21
|
+
p = TimezonePeriod.new(Time.utc(2005,1,1,0,0,0), Time.utc(2005,1,2,0,0,0), -7200, 3600, :TEST)
|
22
|
+
|
23
|
+
assert_equal(DateTime.new(2005,1,1,0,0,0), p.utc_start)
|
24
|
+
assert_equal(DateTime.new(2005,1,2,0,0,0), p.utc_end)
|
25
|
+
assert_equal(-7200, p.utc_offset)
|
26
|
+
assert_equal(3600, p.std_offset)
|
27
|
+
assert_equal(:TEST, p.zone_identifier)
|
28
|
+
assert_equal(DateTime.new(2004,12,31,23,0,0), p.local_start)
|
29
|
+
assert_equal(DateTime.new(2005,1,1,23,0,0), p.local_end)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_initialize_timestamp
|
33
|
+
p = TimezonePeriod.new(1104537600, 1104624000, -7200, 3600, :TEST)
|
34
|
+
|
35
|
+
assert_equal(DateTime.new(2005,1,1,0,0,0), p.utc_start)
|
36
|
+
assert_equal(DateTime.new(2005,1,2,0,0,0), p.utc_end)
|
37
|
+
assert_equal(-7200, p.utc_offset)
|
38
|
+
assert_equal(3600, p.std_offset)
|
39
|
+
assert_equal(:TEST, p.zone_identifier)
|
40
|
+
assert_equal(DateTime.new(2004,12,31,23,0,0), p.local_start)
|
41
|
+
assert_equal(DateTime.new(2005,1,1,23,0,0), p.local_end)
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_initialize_nil
|
45
|
+
p = TimezonePeriod.new(nil, nil, -7200, 3600, :TEST)
|
46
|
+
|
47
|
+
assert_nil(p.utc_start)
|
48
|
+
assert_nil(p.utc_end)
|
49
|
+
assert_equal(-7200, p.utc_offset)
|
50
|
+
assert_equal(3600, p.std_offset)
|
51
|
+
assert_equal(:TEST, p.zone_identifier)
|
52
|
+
assert_nil(p.local_start)
|
53
|
+
assert_nil(p.local_end)
|
27
54
|
end
|
28
55
|
|
29
56
|
def test_utc_total_offset
|
@@ -58,124 +85,172 @@ class TCTimezonePeriod < Test::Unit::TestCase
|
|
58
85
|
|
59
86
|
def test_valid_for_utc
|
60
87
|
p1 = TimezonePeriod.new(DateTime.new(2005,1,1,1,1,1), DateTime.new(2005,2,2,2,2,2), -7200, 3600, :TEST)
|
61
|
-
p2 = TimezonePeriod.new(nil,
|
62
|
-
p3 = TimezonePeriod.new(
|
88
|
+
p2 = TimezonePeriod.new(nil, Time.utc(2005,2,2,2,2,2), -7200, 3600, :TEST)
|
89
|
+
p3 = TimezonePeriod.new(1104541261, nil, -7200, 3600, :TEST)
|
63
90
|
p4 = TimezonePeriod.new(nil, nil, -7200, 3600, :TEST)
|
91
|
+
p5 = TimezonePeriod.new(DateTime.new(1960,1,1,1,1,1), DateTime.new(1960,2,2,2,2,2), -7200, 3600, :TEST)
|
64
92
|
|
65
93
|
assert_equal(true, p1.valid_for_utc?(DateTime.new(2005,1,1,1,1,1)))
|
66
|
-
assert_equal(true, p1.valid_for_utc?(
|
67
|
-
assert_equal(true, p1.valid_for_utc?(
|
94
|
+
assert_equal(true, p1.valid_for_utc?(Time.utc(2005,2,2,2,2,1)))
|
95
|
+
assert_equal(true, p1.valid_for_utc?(1104541262))
|
68
96
|
assert_equal(true, p1.valid_for_utc?(DateTime.new(2005,2,2,2,2,0)))
|
69
97
|
assert_equal(false, p1.valid_for_utc?(DateTime.new(2005,1,1,1,1,0)))
|
70
98
|
assert_equal(false, p1.valid_for_utc?(DateTime.new(2005,2,2,2,2,3)))
|
99
|
+
assert_equal(false, p1.valid_for_utc?(DateTime.new(1960,1,1,1,1,0)))
|
100
|
+
assert_equal(false, p1.valid_for_utc?(DateTime.new(2040,1,1,1,1,0)))
|
71
101
|
|
72
102
|
assert_equal(true, p2.valid_for_utc?(DateTime.new(2005,1,1,1,1,1)))
|
73
|
-
assert_equal(true, p2.valid_for_utc?(
|
74
|
-
assert_equal(true, p2.valid_for_utc?(
|
103
|
+
assert_equal(true, p2.valid_for_utc?(Time.utc(2005,2,2,2,2,1)))
|
104
|
+
assert_equal(true, p2.valid_for_utc?(1104541262))
|
75
105
|
assert_equal(true, p2.valid_for_utc?(DateTime.new(2005,2,2,2,2,0)))
|
76
|
-
assert_equal(true, p2.valid_for_utc?(DateTime.new(2005,1,1,1,1,0)))
|
106
|
+
assert_equal(true, p2.valid_for_utc?(DateTime.new(2005,1,1,1,1,0)))
|
77
107
|
assert_equal(false, p2.valid_for_utc?(DateTime.new(2005,2,2,2,2,3)))
|
108
|
+
assert_equal(true, p2.valid_for_utc?(DateTime.new(1960,1,1,1,1,0)))
|
109
|
+
assert_equal(false, p2.valid_for_utc?(DateTime.new(2040,1,1,1,1,0)))
|
78
110
|
|
79
111
|
assert_equal(true, p3.valid_for_utc?(DateTime.new(2005,1,1,1,1,1)))
|
80
|
-
assert_equal(true, p3.valid_for_utc?(
|
81
|
-
assert_equal(true, p3.valid_for_utc?(
|
112
|
+
assert_equal(true, p3.valid_for_utc?(Time.utc(2005,2,2,2,2,1)))
|
113
|
+
assert_equal(true, p3.valid_for_utc?(1104541262))
|
82
114
|
assert_equal(true, p3.valid_for_utc?(DateTime.new(2005,2,2,2,2,0)))
|
83
115
|
assert_equal(false, p3.valid_for_utc?(DateTime.new(2005,1,1,1,1,0)))
|
84
116
|
assert_equal(true, p3.valid_for_utc?(DateTime.new(2005,2,2,2,2,3)))
|
117
|
+
assert_equal(false, p3.valid_for_utc?(DateTime.new(1960,1,1,1,1,0)))
|
118
|
+
assert_equal(true, p3.valid_for_utc?(DateTime.new(2040,1,1,1,1,0)))
|
85
119
|
|
86
120
|
assert_equal(true, p4.valid_for_utc?(DateTime.new(2005,1,1,1,1,1)))
|
87
|
-
assert_equal(true, p4.valid_for_utc?(
|
88
|
-
assert_equal(true, p4.valid_for_utc?(
|
121
|
+
assert_equal(true, p4.valid_for_utc?(Time.utc(2005,2,2,2,2,1)))
|
122
|
+
assert_equal(true, p4.valid_for_utc?(1104541262))
|
89
123
|
assert_equal(true, p4.valid_for_utc?(DateTime.new(2005,2,2,2,2,0)))
|
90
124
|
assert_equal(true, p4.valid_for_utc?(DateTime.new(2005,1,1,1,1,0)))
|
91
125
|
assert_equal(true, p4.valid_for_utc?(DateTime.new(2005,2,2,2,2,3)))
|
126
|
+
assert_equal(true, p4.valid_for_utc?(DateTime.new(1960,1,1,1,1,0)))
|
127
|
+
assert_equal(true, p4.valid_for_utc?(DateTime.new(2040,1,1,1,1,0)))
|
128
|
+
|
129
|
+
assert_equal(false, p5.valid_for_utc?(Time.utc(2005,1,1,1,1,1)))
|
130
|
+
assert_equal(false, p5.valid_for_utc?(1104541262))
|
92
131
|
end
|
93
132
|
|
94
133
|
def test_utc_after_start
|
95
|
-
p1 = TimezonePeriod.new(
|
96
|
-
p2 = TimezonePeriod.new(nil,
|
134
|
+
p1 = TimezonePeriod.new(1104541261, DateTime.new(2005,2,2,2,2,2), -7200, 3600, :TEST)
|
135
|
+
p2 = TimezonePeriod.new(nil, Time.utc(2005,2,2,2,2,2), -7200, 3600, :TEST)
|
136
|
+
p3 = TimezonePeriod.new(DateTime.new(1945,1,1,1,1,1), DateTime.new(1945,2,2,2,2,2), -7200, 3600, :TEST)
|
97
137
|
|
98
138
|
assert_equal(true, p1.utc_after_start?(DateTime.new(2005,1,1,1,1,1)))
|
99
|
-
assert_equal(true, p1.utc_after_start?(
|
100
|
-
assert_equal(false, p1.utc_after_start?(
|
139
|
+
assert_equal(true, p1.utc_after_start?(Time.utc(2005,1,1,1,1,2)))
|
140
|
+
assert_equal(false, p1.utc_after_start?(1104541260))
|
141
|
+
assert_equal(true, p1.utc_after_start?(DateTime.new(2045,1,1,1,1,0)))
|
142
|
+
assert_equal(false, p1.utc_after_start?(DateTime.new(1955,1,1,1,1,0)))
|
101
143
|
|
102
144
|
assert_equal(true, p2.utc_after_start?(DateTime.new(2005,1,1,1,1,1)))
|
103
|
-
assert_equal(true, p2.utc_after_start?(
|
104
|
-
assert_equal(true, p2.utc_after_start?(
|
145
|
+
assert_equal(true, p2.utc_after_start?(Time.utc(2005,1,1,1,1,2)))
|
146
|
+
assert_equal(true, p2.utc_after_start?(1104541260))
|
147
|
+
|
148
|
+
assert_equal(true, p3.utc_after_start?(Time.utc(2005,1,2,1,1,1)))
|
149
|
+
assert_equal(true, p3.utc_after_start?(1104627661))
|
105
150
|
end
|
106
151
|
|
107
152
|
def test_utc_before_end
|
108
|
-
p1 = TimezonePeriod.new(
|
109
|
-
p2 = TimezonePeriod.new(DateTime.new(2005,1,1,1,1,1), nil, -7200, 3600, :TEST)
|
153
|
+
p1 = TimezonePeriod.new(Time.utc(2005,1,1,1,1,1), 1107309722, -7200, 3600, :TEST)
|
154
|
+
p2 = TimezonePeriod.new(DateTime.new(2005,1,1,1,1,1), nil, -7200, 3600, :TEST)
|
155
|
+
p3 = TimezonePeriod.new(DateTime.new(1945,1,1,1,1,1), DateTime.new(1945,2,2,2,2,2), -7200, 3600, :TEST)
|
110
156
|
|
111
157
|
assert_equal(true, p1.utc_before_end?(DateTime.new(2005,2,2,2,2,1)))
|
112
|
-
assert_equal(true, p1.utc_before_end?(
|
113
|
-
assert_equal(false, p1.utc_before_end?(
|
158
|
+
assert_equal(true, p1.utc_before_end?(Time.utc(2005,2,2,2,2,0)))
|
159
|
+
assert_equal(false, p1.utc_before_end?(1107309723))
|
160
|
+
assert_equal(false, p1.utc_before_end?(DateTime.new(2045,1,1,1,1,0)))
|
161
|
+
assert_equal(true, p1.utc_before_end?(DateTime.new(1955,1,1,1,1,0)))
|
114
162
|
|
115
163
|
assert_equal(true, p2.utc_before_end?(DateTime.new(2005,2,2,2,2,1)))
|
116
|
-
assert_equal(true, p2.utc_before_end?(
|
117
|
-
assert_equal(true, p2.utc_before_end?(
|
164
|
+
assert_equal(true, p2.utc_before_end?(Time.utc(2005,2,2,2,2,0)))
|
165
|
+
assert_equal(true, p2.utc_before_end?(1107309723))
|
166
|
+
|
167
|
+
assert_equal(false, p3.utc_before_end?(Time.utc(2005,1,2,1,1,1)))
|
168
|
+
assert_equal(false, p3.utc_before_end?(1104627661))
|
118
169
|
end
|
119
170
|
|
120
171
|
def test_valid_for_local
|
121
|
-
p1 = TimezonePeriod.new(
|
122
|
-
p2 = TimezonePeriod.new(nil,
|
172
|
+
p1 = TimezonePeriod.new(1104544861, DateTime.new(2005,2,2,3,2,2), -7200, 3600, :TEST)
|
173
|
+
p2 = TimezonePeriod.new(nil, Time.utc(2005,2,2,3,2,2), -7200, 3600, :TEST)
|
123
174
|
p3 = TimezonePeriod.new(DateTime.new(2005,1,1,2,1,1), nil, -7200, 3600, :TEST)
|
124
175
|
p4 = TimezonePeriod.new(nil, nil, -7200, 3600, :TEST)
|
176
|
+
p5 = TimezonePeriod.new(DateTime.new(1960,1,1,1,1,1), DateTime.new(1960,2,2,2,2,2), -7200, 3600, :TEST)
|
125
177
|
|
126
178
|
assert_equal(true, p1.valid_for_local?(DateTime.new(2005,1,1,1,1,1)))
|
127
|
-
assert_equal(true, p1.valid_for_local?(
|
128
|
-
assert_equal(true, p1.valid_for_local?(
|
179
|
+
assert_equal(true, p1.valid_for_local?(Time.utc(2005,2,2,2,2,1)))
|
180
|
+
assert_equal(true, p1.valid_for_local?(1104541262))
|
129
181
|
assert_equal(true, p1.valid_for_local?(DateTime.new(2005,2,2,2,2,0)))
|
130
182
|
assert_equal(false, p1.valid_for_local?(DateTime.new(2005,1,1,1,1,0)))
|
131
183
|
assert_equal(false, p1.valid_for_local?(DateTime.new(2005,2,2,2,2,3)))
|
184
|
+
assert_equal(false, p1.valid_for_local?(DateTime.new(1960,1,1,1,1,0)))
|
185
|
+
assert_equal(false, p1.valid_for_local?(DateTime.new(2040,1,1,1,1,0)))
|
132
186
|
|
133
187
|
assert_equal(true, p2.valid_for_local?(DateTime.new(2005,1,1,1,1,1)))
|
134
188
|
assert_equal(true, p2.valid_for_local?(DateTime.new(2005,2,2,2,2,1)))
|
135
|
-
assert_equal(true, p2.valid_for_local?(
|
189
|
+
assert_equal(true, p2.valid_for_local?(1104541262))
|
136
190
|
assert_equal(true, p2.valid_for_local?(DateTime.new(2005,2,2,2,2,0)))
|
137
191
|
assert_equal(true, p2.valid_for_local?(DateTime.new(2005,1,1,1,1,0)))
|
138
192
|
assert_equal(false, p2.valid_for_local?(DateTime.new(2005,2,2,2,2,3)))
|
193
|
+
assert_equal(true, p2.valid_for_local?(DateTime.new(1960,1,1,1,1,0)))
|
194
|
+
assert_equal(false, p2.valid_for_local?(DateTime.new(2040,1,1,1,1,0)))
|
139
195
|
|
140
196
|
assert_equal(true, p3.valid_for_local?(DateTime.new(2005,1,1,1,1,1)))
|
141
197
|
assert_equal(true, p3.valid_for_local?(DateTime.new(2005,2,2,2,2,1)))
|
142
|
-
assert_equal(true, p3.valid_for_local?(
|
198
|
+
assert_equal(true, p3.valid_for_local?(1104541262))
|
143
199
|
assert_equal(true, p3.valid_for_local?(DateTime.new(2005,2,2,2,2,0)))
|
144
200
|
assert_equal(false, p3.valid_for_local?(DateTime.new(2005,1,1,1,1,0)))
|
145
201
|
assert_equal(true, p3.valid_for_local?(DateTime.new(2005,2,2,2,2,3)))
|
202
|
+
assert_equal(false, p3.valid_for_local?(DateTime.new(1960,1,1,1,1,0)))
|
203
|
+
assert_equal(true, p3.valid_for_local?(DateTime.new(2040,1,1,1,1,0)))
|
146
204
|
|
147
205
|
assert_equal(true, p4.valid_for_local?(DateTime.new(2005,1,1,1,1,1)))
|
148
206
|
assert_equal(true, p4.valid_for_local?(DateTime.new(2005,2,2,2,2,1)))
|
149
|
-
assert_equal(true, p4.valid_for_local?(
|
207
|
+
assert_equal(true, p4.valid_for_local?(1104541262))
|
150
208
|
assert_equal(true, p4.valid_for_local?(DateTime.new(2005,2,2,2,2,0)))
|
151
209
|
assert_equal(true, p4.valid_for_local?(DateTime.new(2005,1,1,1,1,0)))
|
152
210
|
assert_equal(true, p4.valid_for_local?(DateTime.new(2005,2,2,2,2,3)))
|
211
|
+
assert_equal(true, p4.valid_for_local?(DateTime.new(1960,1,1,1,1,0)))
|
212
|
+
assert_equal(true, p4.valid_for_local?(DateTime.new(2040,1,1,1,1,0)))
|
213
|
+
|
214
|
+
assert_equal(false, p5.valid_for_utc?(Time.utc(2005,1,1,1,1,1)))
|
215
|
+
assert_equal(false, p5.valid_for_utc?(1104541262))
|
153
216
|
end
|
154
217
|
|
155
218
|
def test_local_after_start
|
156
|
-
p1 = TimezonePeriod.new(DateTime.new(2005,1,1,2,1,1),
|
157
|
-
p2 = TimezonePeriod.new(nil,
|
219
|
+
p1 = TimezonePeriod.new(DateTime.new(2005,1,1,2,1,1), Time.utc(2005,2,2,3,2,2), -7200, 3600, :TEST)
|
220
|
+
p2 = TimezonePeriod.new(nil, 1107313322, -7200, 3600, :TEST)
|
221
|
+
p3 = TimezonePeriod.new(DateTime.new(1945,1,1,1,1,1), DateTime.new(1945,2,2,2,2,2), -7200, 3600, :TEST)
|
158
222
|
|
159
223
|
assert_equal(true, p1.local_after_start?(DateTime.new(2005,1,1,1,1,1)))
|
160
|
-
assert_equal(true, p1.local_after_start?(
|
161
|
-
assert_equal(false, p1.local_after_start?(
|
224
|
+
assert_equal(true, p1.local_after_start?(Time.utc(2005,1,1,1,1,2)))
|
225
|
+
assert_equal(false, p1.local_after_start?(1104541260))
|
226
|
+
assert_equal(true, p1.local_after_start?(DateTime.new(2045,1,1,1,1,0)))
|
227
|
+
assert_equal(false, p1.local_after_start?(DateTime.new(1955,1,1,1,1,0)))
|
162
228
|
|
163
229
|
assert_equal(true, p2.local_after_start?(DateTime.new(2005,1,1,1,1,1)))
|
164
|
-
assert_equal(true, p2.local_after_start?(
|
165
|
-
assert_equal(true, p2.local_after_start?(
|
230
|
+
assert_equal(true, p2.local_after_start?(Time.utc(2005,1,1,1,1,2)))
|
231
|
+
assert_equal(true, p2.local_after_start?(1104541260))
|
232
|
+
|
233
|
+
assert_equal(true, p3.local_after_start?(Time.utc(2005,1,2,1,1,1)))
|
234
|
+
assert_equal(true, p3.local_after_start?(1104627661))
|
166
235
|
end
|
167
236
|
|
168
237
|
def test_local_before_end
|
169
|
-
p1 = TimezonePeriod.new(
|
170
|
-
p2 = TimezonePeriod.new(DateTime.new(2005,1,1,2,1,1), nil, -7200, 3600, :TEST)
|
238
|
+
p1 = TimezonePeriod.new(Time.utc(2005,1,1,2,1,1), 1107313322, -7200, 3600, :TEST)
|
239
|
+
p2 = TimezonePeriod.new(DateTime.new(2005,1,1,2,1,1), nil, -7200, 3600, :TEST)
|
240
|
+
p3 = TimezonePeriod.new(DateTime.new(1945,1,1,1,1,1), DateTime.new(1945,2,2,2,2,2), -7200, 3600, :TEST)
|
171
241
|
|
172
242
|
assert_equal(true, p1.local_before_end?(DateTime.new(2005,2,2,2,2,1)))
|
173
|
-
assert_equal(true, p1.local_before_end?(
|
174
|
-
assert_equal(false, p1.local_before_end?(
|
243
|
+
assert_equal(true, p1.local_before_end?(Time.utc(2005,2,2,2,2,0)))
|
244
|
+
assert_equal(false, p1.local_before_end?(1107309723))
|
245
|
+
assert_equal(false, p1.local_before_end?(DateTime.new(2045,1,1,1,1,0)))
|
246
|
+
assert_equal(true, p1.local_before_end?(DateTime.new(1955,1,1,1,1,0)))
|
175
247
|
|
176
248
|
assert_equal(true, p2.local_before_end?(DateTime.new(2005,2,2,2,2,1)))
|
177
|
-
assert_equal(true, p2.local_before_end?(
|
178
|
-
assert_equal(true, p2.local_before_end?(
|
249
|
+
assert_equal(true, p2.local_before_end?(Time.utc(2005,2,2,2,2,0)))
|
250
|
+
assert_equal(true, p2.local_before_end?(1107309723))
|
251
|
+
|
252
|
+
assert_equal(false, p3.local_before_end?(Time.utc(2005,1,2,1,1,1)))
|
253
|
+
assert_equal(false, p3.local_before_end?(1104627661))
|
179
254
|
end
|
180
255
|
|
181
256
|
def test_to_local
|
@@ -184,8 +259,8 @@ class TCTimezonePeriod < Test::Unit::TestCase
|
|
184
259
|
p3 = TimezonePeriod.new(DateTime.new(2005,1,1,0,0,0), DateTime.new(2005,2,2,0,0,0), 7200, 3600, :TEST)
|
185
260
|
|
186
261
|
assert_equal(DateTime.new(2005,1,19,22,0,0), p1.to_local(DateTime.new(2005,1,20,1,0,0)))
|
187
|
-
assert_equal(
|
188
|
-
assert_equal(
|
262
|
+
assert_equal(Time.utc(2005,1,19,21,0,0), p2.to_local(Time.utc(2005,1,20,1,0,0)))
|
263
|
+
assert_equal(1106193600, p3.to_local(1106182800))
|
189
264
|
end
|
190
265
|
|
191
266
|
def test_to_utc
|
@@ -194,7 +269,19 @@ class TCTimezonePeriod < Test::Unit::TestCase
|
|
194
269
|
p3 = TimezonePeriod.new(DateTime.new(2005,1,1,0,0,0), DateTime.new(2005,2,2,0,0,0), 7200, 3600, :TEST)
|
195
270
|
|
196
271
|
assert_equal(DateTime.new(2005,1,20,4,0,0), p1.to_utc(DateTime.new(2005,1,20,1,0,0)))
|
197
|
-
assert_equal(
|
198
|
-
assert_equal(
|
272
|
+
assert_equal(Time.utc(2005,1,20,5,0,0), p2.to_utc(Time.utc(2005,1,20,1,0,0)))
|
273
|
+
assert_equal(1106172000, p3.to_utc(1106182800))
|
274
|
+
end
|
275
|
+
|
276
|
+
def test_time_boundary_start
|
277
|
+
p1 = TimezonePeriod.new(Time.utc(1970,1,1,0,0,0), nil, -3600, 0, :TEST)
|
278
|
+
|
279
|
+
assert_equal(DateTime.new(1969,12,31,23,0,0), p1.local_start)
|
280
|
+
end
|
281
|
+
|
282
|
+
def test_time_boundary_end
|
283
|
+
p1 = TimezonePeriod.new(nil, Time.utc(2038,1,19,3,0,0), 0, 3600, :TEST)
|
284
|
+
|
285
|
+
assert_equal(DateTime.new(2038,1,19,4,0,0), p1.local_end)
|
199
286
|
end
|
200
287
|
end
|