1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Pruning unneeded TimeWithZone#change_time_zone_to_current

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Geoff Buesing 2008-02-10 19:15:32 +00:00
parent b9be374ddd
commit 163a4c6f45
2 changed files with 2 additions and 5 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Pruning unneeded TimeWithZone#change_time_zone_to_current [Geoff Buesing]
* Time#zone=, #in_time_zone and #change_time_zone accept a Duration [Geoff Buesing]
* Time#in_time_zone handles Time.local instances correctly [Geoff Buesing]

View file

@ -42,11 +42,6 @@ module ActiveSupport
time.change_time_zone(new_zone)
end
# Changes the time zone to Time.zone without converting the time
def change_time_zone_to_current
time.change_time_zone_to_current
end
# Returns a Time.local() instance of the simultaneous time in your system's ENV['TZ'] zone
def localtime
utc.dup.localtime # use #dup because Time#localtime is destructive