aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 1fd8cbd722..b45d6e3373 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Base#instantiate_time_object uses Time.zone.local() [Geoff Buesing]
+
* Add timezone-aware attribute readers and writers. #10982 [Geoff Buesing]
* Instantiating time objects in multiparameter attributes uses Time.zone if available. #10982 [rick]
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index fc45930d73..f273c04a94 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -2475,7 +2475,7 @@ module ActiveRecord #:nodoc:
# Includes an ugly hack for Time.local instead of Time.new because the latter is reserved by Time itself.
def instantiate_time_object(name, values)
if Time.zone && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
- Time.zone.new(*values)
+ Time.zone.local(*values)
else
@@default_timezone == :utc ? Time.utc(*values) : Time.local(*values)
end