mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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]
This commit is contained in:
parent
98dc582742
commit
f88267d532
3 changed files with 4 additions and 2 deletions
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue