public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
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
gbuesing (author)
Thu May 08 20:21:51 -0700 2008
commit  79e44a5ee484f977c2cad8a4cffe882b816340a1
tree    51809b888cb5047cced8189620fb0bb4e4387b1c
parent  4f03190f262c07c1f389957ff7ae76901495d824
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* 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]
0
+
0
 * 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]
0
 
0
 * Added change_table for migrations (Jeff Dean) [#71]. Example:
...
2571
2572
2573
2574
 
2575
2576
2577
...
2571
2572
2573
 
2574
2575
2576
2577
0
@@ -2571,7 +2571,7 @@
0
       end
0
 
0
       def instantiate_time_object(name, values)
0
- if Time.zone && self.class.time_zone_aware_attributes && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
0
+ if self.class.time_zone_aware_attributes && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym)
0
           Time.zone.local(*values)
0
         else
0
           Time.time_with_datetime_fallback(@@default_timezone, *values)

Comments

    No one has commented yet.