mirror of
https://github.com/github/rails.git
synced 2026-01-08 22:27:59 -05:00
dup before changing to utc
This commit is contained in:
@@ -5,7 +5,7 @@ require 'active_support/values/time_zone'
|
||||
class Time
|
||||
DATE_FORMATS = {
|
||||
:db => lambda { |time|
|
||||
time = time.utc.to_time
|
||||
time = time.dup.utc.to_time
|
||||
|
||||
if !defined?(ActiveRecord::Base.default_timezone) || ActiveRecord::Base.default_timezone == :local
|
||||
# our DB is in local time (ugh), so make sure the time object is
|
||||
|
||||
Reference in New Issue
Block a user