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.

Files changed (135) hide show
  1. data/CHANGES +23 -18
  2. data/Rakefile +1 -1
  3. data/lib/tzinfo/definitions/Africa/Timbuktu.rb +1 -0
  4. data/lib/tzinfo/definitions/America/Argentina/ComodRivadavia.rb +1 -0
  5. data/lib/tzinfo/definitions/America/Atka.rb +1 -0
  6. data/lib/tzinfo/definitions/America/Buenos_Aires.rb +1 -0
  7. data/lib/tzinfo/definitions/America/Catamarca.rb +1 -0
  8. data/lib/tzinfo/definitions/America/Cordoba.rb +1 -0
  9. data/lib/tzinfo/definitions/America/Ensenada.rb +1 -0
  10. data/lib/tzinfo/definitions/America/Fort_Wayne.rb +1 -0
  11. data/lib/tzinfo/definitions/America/Guatemala.rb +3 -1
  12. data/lib/tzinfo/definitions/America/Indianapolis.rb +1 -0
  13. data/lib/tzinfo/definitions/America/Jujuy.rb +1 -0
  14. data/lib/tzinfo/definitions/America/Knox_IN.rb +1 -0
  15. data/lib/tzinfo/definitions/America/Louisville.rb +1 -0
  16. data/lib/tzinfo/definitions/America/Managua.rb +7 -5
  17. data/lib/tzinfo/definitions/America/Mendoza.rb +1 -0
  18. data/lib/tzinfo/definitions/America/Porto_Acre.rb +1 -0
  19. data/lib/tzinfo/definitions/America/Rosario.rb +1 -0
  20. data/lib/tzinfo/definitions/America/Shiprock.rb +1 -0
  21. data/lib/tzinfo/definitions/America/Tegucigalpa.rb +3 -1
  22. data/lib/tzinfo/definitions/America/Virgin.rb +1 -0
  23. data/lib/tzinfo/definitions/Antarctica/South_Pole.rb +1 -0
  24. data/lib/tzinfo/definitions/Arctic/Longyearbyen.rb +1 -0
  25. data/lib/tzinfo/definitions/Asia/Ashkhabad.rb +1 -0
  26. data/lib/tzinfo/definitions/Asia/Chungking.rb +1 -0
  27. data/lib/tzinfo/definitions/Asia/Dacca.rb +1 -0
  28. data/lib/tzinfo/definitions/Asia/Istanbul.rb +1 -0
  29. data/lib/tzinfo/definitions/Asia/Macao.rb +1 -0
  30. data/lib/tzinfo/definitions/Asia/Tel_Aviv.rb +1 -0
  31. data/lib/tzinfo/definitions/Asia/Thimbu.rb +1 -0
  32. data/lib/tzinfo/definitions/Asia/Ujung_Pandang.rb +1 -0
  33. data/lib/tzinfo/definitions/Asia/Ulan_Bator.rb +1 -0
  34. data/lib/tzinfo/definitions/Atlantic/Jan_Mayen.rb +1 -0
  35. data/lib/tzinfo/definitions/Australia/ACT.rb +1 -0
  36. data/lib/tzinfo/definitions/Australia/Canberra.rb +1 -0
  37. data/lib/tzinfo/definitions/Australia/LHI.rb +1 -0
  38. data/lib/tzinfo/definitions/Australia/NSW.rb +1 -0
  39. data/lib/tzinfo/definitions/Australia/North.rb +1 -0
  40. data/lib/tzinfo/definitions/Australia/Queensland.rb +1 -0
  41. data/lib/tzinfo/definitions/Australia/South.rb +1 -0
  42. data/lib/tzinfo/definitions/Australia/Tasmania.rb +1 -0
  43. data/lib/tzinfo/definitions/Australia/Victoria.rb +1 -0
  44. data/lib/tzinfo/definitions/Australia/West.rb +1 -0
  45. data/lib/tzinfo/definitions/Australia/Yancowinna.rb +1 -0
  46. data/lib/tzinfo/definitions/Brazil/Acre.rb +1 -0
  47. data/lib/tzinfo/definitions/Brazil/DeNoronha.rb +1 -0
  48. data/lib/tzinfo/definitions/Brazil/East.rb +1 -0
  49. data/lib/tzinfo/definitions/Brazil/West.rb +1 -0
  50. data/lib/tzinfo/definitions/Canada/Atlantic.rb +1 -0
  51. data/lib/tzinfo/definitions/Canada/Central.rb +1 -0
  52. data/lib/tzinfo/definitions/Canada/East__m__Saskatchewan.rb +1 -0
  53. data/lib/tzinfo/definitions/Canada/Eastern.rb +1 -0
  54. data/lib/tzinfo/definitions/Canada/Mountain.rb +1 -0
  55. data/lib/tzinfo/definitions/Canada/Newfoundland.rb +1 -0
  56. data/lib/tzinfo/definitions/Canada/Pacific.rb +1 -0
  57. data/lib/tzinfo/definitions/Canada/Saskatchewan.rb +1 -0
  58. data/lib/tzinfo/definitions/Canada/Yukon.rb +1 -0
  59. data/lib/tzinfo/definitions/Chile/Continental.rb +1 -0
  60. data/lib/tzinfo/definitions/Chile/EasterIsland.rb +1 -0
  61. data/lib/tzinfo/definitions/Cuba.rb +1 -0
  62. data/lib/tzinfo/definitions/Egypt.rb +1 -0
  63. data/lib/tzinfo/definitions/Eire.rb +1 -0
  64. data/lib/tzinfo/definitions/Etc/GMT0.rb +1 -0
  65. data/lib/tzinfo/definitions/Etc/GMT__m__0.rb +1 -0
  66. data/lib/tzinfo/definitions/Etc/GMT__p__0.rb +1 -0
  67. data/lib/tzinfo/definitions/Etc/Greenwich.rb +1 -0
  68. data/lib/tzinfo/definitions/Etc/Universal.rb +1 -0
  69. data/lib/tzinfo/definitions/Etc/Zulu.rb +1 -0
  70. data/lib/tzinfo/definitions/Europe/Belfast.rb +1 -0
  71. data/lib/tzinfo/definitions/Europe/Bratislava.rb +1 -0
  72. data/lib/tzinfo/definitions/Europe/Ljubljana.rb +1 -0
  73. data/lib/tzinfo/definitions/Europe/Mariehamn.rb +1 -0
  74. data/lib/tzinfo/definitions/Europe/Nicosia.rb +1 -0
  75. data/lib/tzinfo/definitions/Europe/San_Marino.rb +1 -0
  76. data/lib/tzinfo/definitions/Europe/Sarajevo.rb +1 -0
  77. data/lib/tzinfo/definitions/Europe/Skopje.rb +1 -0
  78. data/lib/tzinfo/definitions/Europe/Tiraspol.rb +1 -0
  79. data/lib/tzinfo/definitions/Europe/Vatican.rb +1 -0
  80. data/lib/tzinfo/definitions/Europe/Zagreb.rb +1 -0
  81. data/lib/tzinfo/definitions/GB.rb +1 -0
  82. data/lib/tzinfo/definitions/GB__m__Eire.rb +1 -0
  83. data/lib/tzinfo/definitions/GMT.rb +1 -0
  84. data/lib/tzinfo/definitions/GMT0.rb +1 -0
  85. data/lib/tzinfo/definitions/GMT__m__0.rb +1 -0
  86. data/lib/tzinfo/definitions/GMT__p__0.rb +1 -0
  87. data/lib/tzinfo/definitions/Greenwich.rb +1 -0
  88. data/lib/tzinfo/definitions/Hongkong.rb +1 -0
  89. data/lib/tzinfo/definitions/Iceland.rb +1 -0
  90. data/lib/tzinfo/definitions/Iran.rb +1 -0
  91. data/lib/tzinfo/definitions/Israel.rb +1 -0
  92. data/lib/tzinfo/definitions/Jamaica.rb +1 -0
  93. data/lib/tzinfo/definitions/Japan.rb +1 -0
  94. data/lib/tzinfo/definitions/Kwajalein.rb +1 -0
  95. data/lib/tzinfo/definitions/Libya.rb +1 -0
  96. data/lib/tzinfo/definitions/Mexico/BajaNorte.rb +1 -0
  97. data/lib/tzinfo/definitions/Mexico/BajaSur.rb +1 -0
  98. data/lib/tzinfo/definitions/Mexico/General.rb +1 -0
  99. data/lib/tzinfo/definitions/Mideast/Riyadh87.rb +1 -0
  100. data/lib/tzinfo/definitions/Mideast/Riyadh88.rb +1 -0
  101. data/lib/tzinfo/definitions/Mideast/Riyadh89.rb +1 -0
  102. data/lib/tzinfo/definitions/NZ.rb +1 -0
  103. data/lib/tzinfo/definitions/NZ__m__CHAT.rb +1 -0
  104. data/lib/tzinfo/definitions/Navajo.rb +1 -0
  105. data/lib/tzinfo/definitions/PRC.rb +1 -0
  106. data/lib/tzinfo/definitions/Pacific/Samoa.rb +1 -0
  107. data/lib/tzinfo/definitions/Pacific/Yap.rb +1 -0
  108. data/lib/tzinfo/definitions/Poland.rb +1 -0
  109. data/lib/tzinfo/definitions/Portugal.rb +1 -0
  110. data/lib/tzinfo/definitions/ROC.rb +1 -0
  111. data/lib/tzinfo/definitions/ROK.rb +1 -0
  112. data/lib/tzinfo/definitions/Singapore.rb +1 -0
  113. data/lib/tzinfo/definitions/Turkey.rb +1 -0
  114. data/lib/tzinfo/definitions/UCT.rb +1 -0
  115. data/lib/tzinfo/definitions/US/Alaska.rb +1 -0
  116. data/lib/tzinfo/definitions/US/Aleutian.rb +1 -0
  117. data/lib/tzinfo/definitions/US/Arizona.rb +1 -0
  118. data/lib/tzinfo/definitions/US/Central.rb +1 -0
  119. data/lib/tzinfo/definitions/US/East__m__Indiana.rb +1 -0
  120. data/lib/tzinfo/definitions/US/Eastern.rb +1 -0
  121. data/lib/tzinfo/definitions/US/Hawaii.rb +1 -0
  122. data/lib/tzinfo/definitions/US/Indiana__m__Starke.rb +1 -0
  123. data/lib/tzinfo/definitions/US/Michigan.rb +1 -0
  124. data/lib/tzinfo/definitions/US/Mountain.rb +1 -0
  125. data/lib/tzinfo/definitions/US/Pacific.rb +1 -0
  126. data/lib/tzinfo/definitions/US/Pacific__m__New.rb +1 -0
  127. data/lib/tzinfo/definitions/US/Samoa.rb +1 -0
  128. data/lib/tzinfo/definitions/UTC.rb +1 -0
  129. data/lib/tzinfo/definitions/Universal.rb +1 -0
  130. data/lib/tzinfo/definitions/W__m__SU.rb +1 -0
  131. data/lib/tzinfo/definitions/Zulu.rb +1 -0
  132. data/lib/tzinfo/timezone.rb +15 -5
  133. data/lib/tzinfo/tzdataparser.rb +1 -0
  134. data/test/tc_timezone.rb +33 -0
  135. metadata +2 -2
@@ -544,6 +544,7 @@ module TZInfo
544
544
  puts "writing link #{name}"
545
545
 
546
546
  create_file(output_dir) {|file|
547
+ file.puts('setup_linked')
547
548
  file.puts("set_identifier('#{@name.gsub(/'/, '\\\'')}')")
548
549
  }
549
550
  end
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.1
7
- date: 2006-04-17 00:00:00 +01:00
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