diff options
author | gbuesing <gbuesing@gmail.com> | 2008-07-14 23:16:39 -0500 |
---|---|---|
committer | gbuesing <gbuesing@gmail.com> | 2008-07-14 23:16:39 -0500 |
commit | 34510456585216004e483b79beeea3ddc3eb4de6 (patch) | |
tree | 39e186f2e5e41d4a61e659db10c25361aced73be /activesupport/lib/active_support/time_with_zone.rb | |
parent | 7f0346237e30e55d6cd16a8b4a9dfe4193f61804 (diff) | |
download | rails-34510456585216004e483b79beeea3ddc3eb4de6.tar.gz rails-34510456585216004e483b79beeea3ddc3eb4de6.tar.bz2 rails-34510456585216004e483b79beeea3ddc3eb4de6.zip |
Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 88593eb92d..e85bfe9b2e 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -263,7 +263,7 @@ module ActiveSupport end def marshal_load(variables) - initialize(variables[0], ::Time.send!(:get_zone, variables[1]), variables[2]) + initialize(variables[0].utc, ::Time.send!(:get_zone, variables[1]), variables[2].utc) end # Ensure proxy class responds to all methods that underlying time instance responds to. |