diff options
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index f840783059..fac91c31da 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,41 @@ +* Ensure duration parsing is consistent across DST changes + + Previously `ActiveSupport::Duration.parse` used `Time.current` and + `Time#advance` to calculate the number of seconds in the duration + from an arbitrary collection of parts. However as `advance` tries to + be consistent across DST boundaries this meant that either the + duration was shorter or longer depending on the time of year. + + This was fixed by using an absolute reference point in UTC which + isn't subject to DST transitions. An arbitrary date of Jan 1st, 2000 + was chosen for no other reason that it seemed appropriate. + + Additionally, duration parsing should now be marginally faster as we + are no longer creating instances of `ActiveSupport::TimeWithZone` + every time we parse a duration string. + + Fixes #26941. + + *Andrew White* + +* Use `Hash#compact` and `Hash#compact!` from Ruby 2.4. Old Ruby versions + will continue to get these methods from Active Support as before. + + *Prathamesh Sonpatki* + +* Fix `ActiveSupport::TimeZone#strptime`. + Support for timestamps in format of seconds (%s) and milliseconds (%Q). + + Fixes #26840. + + *Lev Denisov* + +* Fix `DateAndTime::Calculations#copy_time_to`. Copy `nsec` instead of `usec`. + + Jumping forward or backward between weeks now preserves nanosecond digits. + + *Josua Schmid* + * Fix `ActiveSupport::TimeWithZone#in` across DST boundaries. Previously calls to `in` were being sent to the non-DST aware @@ -8,10 +46,10 @@ Time.zone = "US/Eastern" t = Time.zone.local(2016,11,6,1) - # => Sun, 06 Nov 2016 01:00:00 EDT -05:00 + # => Sun, 06 Nov 2016 01:00:00 EDT -05:00 t.in(1.hour) - # => Sun, 06 Nov 2016 01:00:00 EST -05:00 + # => Sun, 06 Nov 2016 01:00:00 EST -05:00 Fixes #26580. |