Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8077

Show
Ignore:
Timestamp:
11/05/07 22:29:52 (1 year ago)
Author:
nzkoz
Message:

Use the safe conversion code introduced in earlier commit. References #10068 [gbuesing]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

    r7973 r8077  
    174174          # Over/underflow to DateTime 
    175175          rescue ArgumentError, TypeError 
    176             zone_offset = if Base.default_timezone == :local then DateTime.now.offset else 0 end 
     176            zone_offset = Base.default_timezone == :local ? DateTime.local_offset : 0 
    177177            # Append zero calendar reform start to account for dates skipped by calendar reform 
    178178            DateTime.new(year, mon, mday, hour, min, sec, zone_offset, 0) rescue nil