diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index c6cdc776d6..39064d4d13 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -174,8 +174,7 @@ module ActiveRecord # Over/underflow to DateTime rescue ArgumentError, TypeError zone_offset = Base.default_timezone == :local ? DateTime.local_offset : 0 - # Append zero calendar reform start to account for dates skipped by calendar reform - DateTime.new(year, mon, mday, hour, min, sec, zone_offset, 0) rescue nil + DateTime.civil(year, mon, mday, hour, min, sec, zone_offset) rescue nil end def fast_string_to_date(string) |