tzinfo 0.2.1 → 0.2.2
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 +23 -18
- data/Rakefile +1 -1
- data/lib/tzinfo/definitions/Africa/Timbuktu.rb +1 -0
- data/lib/tzinfo/definitions/America/Argentina/ComodRivadavia.rb +1 -0
- data/lib/tzinfo/definitions/America/Atka.rb +1 -0
- data/lib/tzinfo/definitions/America/Buenos_Aires.rb +1 -0
- data/lib/tzinfo/definitions/America/Catamarca.rb +1 -0
- data/lib/tzinfo/definitions/America/Cordoba.rb +1 -0
- data/lib/tzinfo/definitions/America/Ensenada.rb +1 -0
- data/lib/tzinfo/definitions/America/Fort_Wayne.rb +1 -0
- data/lib/tzinfo/definitions/America/Guatemala.rb +3 -1
- data/lib/tzinfo/definitions/America/Indianapolis.rb +1 -0
- data/lib/tzinfo/definitions/America/Jujuy.rb +1 -0
- data/lib/tzinfo/definitions/America/Knox_IN.rb +1 -0
- data/lib/tzinfo/definitions/America/Louisville.rb +1 -0
- data/lib/tzinfo/definitions/America/Managua.rb +7 -5
- data/lib/tzinfo/definitions/America/Mendoza.rb +1 -0
- data/lib/tzinfo/definitions/America/Porto_Acre.rb +1 -0
- data/lib/tzinfo/definitions/America/Rosario.rb +1 -0
- data/lib/tzinfo/definitions/America/Shiprock.rb +1 -0
- data/lib/tzinfo/definitions/America/Tegucigalpa.rb +3 -1
- data/lib/tzinfo/definitions/America/Virgin.rb +1 -0
- data/lib/tzinfo/definitions/Antarctica/South_Pole.rb +1 -0
- data/lib/tzinfo/definitions/Arctic/Longyearbyen.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Ashkhabad.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Chungking.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Dacca.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Istanbul.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Macao.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Tel_Aviv.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Thimbu.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Ujung_Pandang.rb +1 -0
- data/lib/tzinfo/definitions/Asia/Ulan_Bator.rb +1 -0
- data/lib/tzinfo/definitions/Atlantic/Jan_Mayen.rb +1 -0
- data/lib/tzinfo/definitions/Australia/ACT.rb +1 -0
- data/lib/tzinfo/definitions/Australia/Canberra.rb +1 -0
- data/lib/tzinfo/definitions/Australia/LHI.rb +1 -0
- data/lib/tzinfo/definitions/Australia/NSW.rb +1 -0
- data/lib/tzinfo/definitions/Australia/North.rb +1 -0
- data/lib/tzinfo/definitions/Australia/Queensland.rb +1 -0
- data/lib/tzinfo/definitions/Australia/South.rb +1 -0
- data/lib/tzinfo/definitions/Australia/Tasmania.rb +1 -0
- data/lib/tzinfo/definitions/Australia/Victoria.rb +1 -0
- data/lib/tzinfo/definitions/Australia/West.rb +1 -0
- data/lib/tzinfo/definitions/Australia/Yancowinna.rb +1 -0
- data/lib/tzinfo/definitions/Brazil/Acre.rb +1 -0
- data/lib/tzinfo/definitions/Brazil/DeNoronha.rb +1 -0
- data/lib/tzinfo/definitions/Brazil/East.rb +1 -0
- data/lib/tzinfo/definitions/Brazil/West.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Atlantic.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Central.rb +1 -0
- data/lib/tzinfo/definitions/Canada/East__m__Saskatchewan.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Eastern.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Mountain.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Newfoundland.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Pacific.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Saskatchewan.rb +1 -0
- data/lib/tzinfo/definitions/Canada/Yukon.rb +1 -0
- data/lib/tzinfo/definitions/Chile/Continental.rb +1 -0
- data/lib/tzinfo/definitions/Chile/EasterIsland.rb +1 -0
- data/lib/tzinfo/definitions/Cuba.rb +1 -0
- data/lib/tzinfo/definitions/Egypt.rb +1 -0
- data/lib/tzinfo/definitions/Eire.rb +1 -0
- data/lib/tzinfo/definitions/Etc/GMT0.rb +1 -0
- data/lib/tzinfo/definitions/Etc/GMT__m__0.rb +1 -0
- data/lib/tzinfo/definitions/Etc/GMT__p__0.rb +1 -0
- data/lib/tzinfo/definitions/Etc/Greenwich.rb +1 -0
- data/lib/tzinfo/definitions/Etc/Universal.rb +1 -0
- data/lib/tzinfo/definitions/Etc/Zulu.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Belfast.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Bratislava.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Ljubljana.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Mariehamn.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Nicosia.rb +1 -0
- data/lib/tzinfo/definitions/Europe/San_Marino.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Sarajevo.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Skopje.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Tiraspol.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Vatican.rb +1 -0
- data/lib/tzinfo/definitions/Europe/Zagreb.rb +1 -0
- data/lib/tzinfo/definitions/GB.rb +1 -0
- data/lib/tzinfo/definitions/GB__m__Eire.rb +1 -0
- data/lib/tzinfo/definitions/GMT.rb +1 -0
- data/lib/tzinfo/definitions/GMT0.rb +1 -0
- data/lib/tzinfo/definitions/GMT__m__0.rb +1 -0
- data/lib/tzinfo/definitions/GMT__p__0.rb +1 -0
- data/lib/tzinfo/definitions/Greenwich.rb +1 -0
- data/lib/tzinfo/definitions/Hongkong.rb +1 -0
- data/lib/tzinfo/definitions/Iceland.rb +1 -0
- data/lib/tzinfo/definitions/Iran.rb +1 -0
- data/lib/tzinfo/definitions/Israel.rb +1 -0
- data/lib/tzinfo/definitions/Jamaica.rb +1 -0
- data/lib/tzinfo/definitions/Japan.rb +1 -0
- data/lib/tzinfo/definitions/Kwajalein.rb +1 -0
- data/lib/tzinfo/definitions/Libya.rb +1 -0
- data/lib/tzinfo/definitions/Mexico/BajaNorte.rb +1 -0
- data/lib/tzinfo/definitions/Mexico/BajaSur.rb +1 -0
- data/lib/tzinfo/definitions/Mexico/General.rb +1 -0
- data/lib/tzinfo/definitions/Mideast/Riyadh87.rb +1 -0
- data/lib/tzinfo/definitions/Mideast/Riyadh88.rb +1 -0
- data/lib/tzinfo/definitions/Mideast/Riyadh89.rb +1 -0
- data/lib/tzinfo/definitions/NZ.rb +1 -0
- data/lib/tzinfo/definitions/NZ__m__CHAT.rb +1 -0
- data/lib/tzinfo/definitions/Navajo.rb +1 -0
- data/lib/tzinfo/definitions/PRC.rb +1 -0
- data/lib/tzinfo/definitions/Pacific/Samoa.rb +1 -0
- data/lib/tzinfo/definitions/Pacific/Yap.rb +1 -0
- data/lib/tzinfo/definitions/Poland.rb +1 -0
- data/lib/tzinfo/definitions/Portugal.rb +1 -0
- data/lib/tzinfo/definitions/ROC.rb +1 -0
- data/lib/tzinfo/definitions/ROK.rb +1 -0
- data/lib/tzinfo/definitions/Singapore.rb +1 -0
- data/lib/tzinfo/definitions/Turkey.rb +1 -0
- data/lib/tzinfo/definitions/UCT.rb +1 -0
- data/lib/tzinfo/definitions/US/Alaska.rb +1 -0
- data/lib/tzinfo/definitions/US/Aleutian.rb +1 -0
- data/lib/tzinfo/definitions/US/Arizona.rb +1 -0
- data/lib/tzinfo/definitions/US/Central.rb +1 -0
- data/lib/tzinfo/definitions/US/East__m__Indiana.rb +1 -0
- data/lib/tzinfo/definitions/US/Eastern.rb +1 -0
- data/lib/tzinfo/definitions/US/Hawaii.rb +1 -0
- data/lib/tzinfo/definitions/US/Indiana__m__Starke.rb +1 -0
- data/lib/tzinfo/definitions/US/Michigan.rb +1 -0
- data/lib/tzinfo/definitions/US/Mountain.rb +1 -0
- data/lib/tzinfo/definitions/US/Pacific.rb +1 -0
- data/lib/tzinfo/definitions/US/Pacific__m__New.rb +1 -0
- data/lib/tzinfo/definitions/US/Samoa.rb +1 -0
- data/lib/tzinfo/definitions/UTC.rb +1 -0
- data/lib/tzinfo/definitions/Universal.rb +1 -0
- data/lib/tzinfo/definitions/W__m__SU.rb +1 -0
- data/lib/tzinfo/definitions/Zulu.rb +1 -0
- data/lib/tzinfo/timezone.rb +15 -5
- data/lib/tzinfo/tzdataparser.rb +1 -0
- data/test/tc_timezone.rb +33 -0
- metadata +2 -2
data/lib/tzinfo/tzdataparser.rb
CHANGED
data/test/tc_timezone.rb
CHANGED
@@ -575,6 +575,39 @@ class TCTimezone < Test::Unit::TestCase
|
|
575
575
|
assert((Timezone.get('Europe/Paris') <=> Timezone.get('America/New_York')) > 0)
|
576
576
|
end
|
577
577
|
|
578
|
+
# Identifier for the parent zone was getting set to the identifier of the
|
579
|
+
# last linked zone to be loaded. See bug #4502.
|
580
|
+
def test_linked_identifier
|
581
|
+
zones = ['Europe/Belgrade', 'Europe/Ljubljana', 'Europe/Sarajevo',
|
582
|
+
'Europe/Skopje', 'Europe/Zagreb']
|
583
|
+
zones = zones + zones.reverse
|
584
|
+
|
585
|
+
zones.each {|z| assert_equal(z, Timezone.get(z).identifier)}
|
586
|
+
end
|
587
|
+
|
588
|
+
# When requesting a linked zone, an instance of the parent zone was being
|
589
|
+
# returned. See the first comment in bug #4502.
|
590
|
+
def test_linked_class
|
591
|
+
zones = ['Europe/Belgrade', 'Europe/Ljubljana', 'Europe/Sarajevo',
|
592
|
+
'Europe/Skopje', 'Europe/Zagreb']
|
593
|
+
zones = zones + zones.reverse
|
594
|
+
|
595
|
+
zones.each {|z|
|
596
|
+
assert_equal("TZInfo::Definitions::#{z.sub(/\//, '::')}",
|
597
|
+
Timezone.get(z).class.name)
|
598
|
+
}
|
599
|
+
end
|
600
|
+
|
601
|
+
def test_linked_instance
|
602
|
+
zones = ['Europe/Belgrade', 'Europe/Ljubljana', 'Europe/Sarajevo',
|
603
|
+
'Europe/Skopje', 'Europe/Zagreb']
|
604
|
+
zones = zones + zones.reverse
|
605
|
+
|
606
|
+
zones.each {|z|
|
607
|
+
assert_equal(Timezone.get(z).class, Timezone.get(z).class.instance.class)
|
608
|
+
}
|
609
|
+
end
|
610
|
+
|
578
611
|
private
|
579
612
|
def assert_period_for(utc_start, utc_end, dst, period)
|
580
613
|
assert_equal(utc_start, period.utc_start)
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: tzinfo
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2006-
|
6
|
+
version: 0.2.2
|
7
|
+
date: 2006-05-17 00:00:00 +01:00
|
8
8
|
summary: Daylight-savings aware timezone library
|
9
9
|
require_paths:
|
10
10
|
- lib
|