Skip to content

Commit

Permalink
TimeZone#to_s uses UTC rather than GMT; reapplying change that was un…
Browse files Browse the repository at this point in the history
…done in [8679]. References #1689

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
gbuesing committed Jan 25, 2008
1 parent 8f7232b commit 2168178
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*

* TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in [8679]. #1689 [Cheah Chu Yeow]

* Time.days_in_month defaults to current year if no year is supplied as argument #10799 [Radar], uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month [Geoff Buesing]

* Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared [Geoff Buesing]
Expand Down
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/values/time_zone.rb
Expand Up @@ -171,7 +171,7 @@ def <=>(zone)

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

begin # the following methods depend on the tzinfo gem
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/time_zone_test.rb
Expand Up @@ -95,7 +95,7 @@ def test_zone_compare
end

def test_to_s
assert_equal "(GMT+03:00) Moscow", TimeZone['Moscow'].to_s
assert_equal "(UTC+03:00) Moscow", TimeZone['Moscow'].to_s
end

def test_all_sorted
Expand Down

0 comments on commit 2168178

Please sign in to comment.