aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorgbuesing <gbuesing@gmail.com>2008-05-25 11:56:29 -0500
committergbuesing <gbuesing@gmail.com>2008-05-25 11:56:29 -0500
commitf88267d532ecbfebb66b95863a4875b65507ddf3 (patch)
tree105575be266671eecb054406772149ab950d8f2e /activesupport
parent98dc582742779081e71e697fcdf8d9ae2b421b16 (diff)
downloadrails-f88267d532ecbfebb66b95863a4875b65507ddf3.tar.gz
rails-f88267d532ecbfebb66b95863a4875b65507ddf3.tar.bz2
rails-f88267d532ecbfebb66b95863a4875b65507ddf3.zip
TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb2
-rw-r--r--activesupport/test/time_zone_test.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 6250f33998..7e408840c4 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,3 +1,5 @@
+* TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370] [Geoff Buesing]
+
* Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out of range of Time. Adding tests for utc offsets [Geoff Buesing]
* TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arg [Geoff Buesing]
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 4d7239d8cf..a71c819fba 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -202,7 +202,7 @@ class TimeZone
# Returns a textual representation of this time zone.
def to_s
- "(UTC#{formatted_offset}) #{name}"
+ "(GMT#{formatted_offset}) #{name}"
end
# Method for creating new ActiveSupport::TimeWithZone instance in time zone of +self+ from given values. Example:
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 3757ddcedb..f3069b589b 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -252,7 +252,7 @@ class TimeZoneTest < Test::Unit::TestCase
end
def test_to_s
- assert_equal "(UTC+03:00) Moscow", TimeZone['Moscow'].to_s
+ assert_equal "(GMT+03:00) Moscow", TimeZone['Moscow'].to_s
end
def test_all_sorted