-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Closed
Description
Ruby 2.4 changes Time#to_time
and DateTime#to_time
to preserve timezone. This is a good thing, but it breaks Active Support's scheme to harmonize #to_time
behavior.
Example build failures:
- https://github.com/rails/rails/blob/master/activesupport/test/core_ext/date_time_ext_test.rb#L55
- https://github.com/rails/rails/blob/master/activesupport/test/core_ext/time_with_zone_test.rb#L423
- https://travis-ci.org/rails/rails/jobs/124101215#L533-L542
Ruby changes:
We'll need to update our #to_time
to feature-detect the new versions and behave consistently on Ruby 2.3.0 and 2.4.0.