Skip to content

Commit

Permalink
TimeZone#to_s uses UTC rather than GMT. References #1689.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Dec 10, 2007
1 parent bcbcc02 commit dc3e55d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN* *SVN*


* TimeZone#to_s uses UTC rather than GMT. #1689 [Chu Yeow]

* Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH] * Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH]


* Fix HashWithIndifferentAccess#to_options! so it doesn't clear the options hash. Closes #10419 [ReinH] * Fix HashWithIndifferentAccess#to_options! so it doesn't clear the options hash. Closes #10419 [ReinH]
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/values/time_zone.rb
Expand Up @@ -68,7 +68,7 @@ def <=>(zone)


# Returns a textual representation of this time zone. # Returns a textual representation of this time zone.
def to_s def to_s
"(GMT#{formatted_offset}) #{name}" "(UTC#{formatted_offset}) #{name}"
end end


@@zones = nil @@zones = nil
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/time_zone_test.rb
Expand Up @@ -67,7 +67,7 @@ def test_zone_compare


def test_to_s def test_to_s
zone = TimeZone.create( "Test", 4200 ) zone = TimeZone.create( "Test", 4200 )
assert_equal "(GMT+01:10) Test", zone.to_s assert_equal "(UTC+01:10) Test", zone.to_s
end end


def test_all_sorted def test_all_sorted
Expand Down

0 comments on commit dc3e55d

Please sign in to comment.