aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb4
-rw-r--r--activesupport/test/time_zone_test.rb2
3 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 12b300d3ae..1475586cde 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*2.2.1 [RC2 or 2.2 final]*
+* TimeZone: fix offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date [Geoff Buesing]
+
* TimeZone: Caracas GMT offset changed to -4:30 [#1361 state:resolved] [Phil Ross]
* Added render :js for people who want to render inline JavaScript replies without using RJS [DHH]
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 335d75d218..1d87fa64b5 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -326,9 +326,9 @@ module ActiveSupport
[ 14_400, "Abu Dhabi", "Muscat", "Baku", "Tbilisi", "Yerevan" ],
[ 16_200, "Kabul" ],
[ 18_000, "Ekaterinburg", "Islamabad", "Karachi", "Tashkent" ],
- [ 19_800, "Chennai", "Kolkata", "Mumbai", "New Delhi" ],
+ [ 19_800, "Chennai", "Kolkata", "Mumbai", "New Delhi", "Sri Jayawardenepura" ],
[ 20_700, "Kathmandu" ],
- [ 21_600, "Astana", "Dhaka", "Sri Jayawardenepura", "Almaty",
+ [ 21_600, "Astana", "Dhaka", "Almaty",
"Novosibirsk" ],
[ 23_400, "Rangoon" ],
[ 25_200, "Bangkok", "Hanoi", "Jakarta", "Krasnoyarsk" ],
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 515ffcf0bf..d999b9f2a8 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -51,7 +51,7 @@ class TimeZoneTest < Test::Unit::TestCase
define_method("test_utc_offset_for_#{name}") do
silence_warnings do # silence warnings raised by tzinfo gem
- period = zone.tzinfo.period_for_utc(Time.utc(2006,1,1,0,0,0))
+ period = zone.tzinfo.period_for_utc(Time.utc(2009,1,1,0,0,0))
assert_equal period.utc_offset, zone.utc_offset
end
end