提交 79e44a5e 编写于 作者: G gbuesing

Base#instantiate_time_object: eliminate check for Time.zone, since we can...

Base#instantiate_time_object: eliminate check for Time.zone, since we can assume this is set if time_zone_aware_attributes is set to true
上级 4f03190f
*SVN*
* Base#instantiate_time_object: eliminate check for Time.zone, since we can assume this is set if time_zone_aware_attributes is set to true [Geoff Buesing]
* Time zone aware attribute methods use Time.zone.parse instead of #to_time for String arguments, so that offset information in String is respected. Resolves #105. [Scott Fleckenstein, Geoff Buesing]
* Added change_table for migrations (Jeff Dean) [#71]. Example:
......
......@@ -2571,7 +2571,7 @@ def assign_multiparameter_attributes(pairs)
end
def instantiate_time_object(name, values)
if Time.zone && self.class.time_zone_aware_attributes && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
if self.class.time_zone_aware_attributes && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
Time.zone.local(*values)
else
Time.time_with_datetime_fallback(@@default_timezone, *values)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册