diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2016-10-01 21:30:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 21:30:02 +0100 |
commit | 9ce2d1b1a43fc4ef3db59849b7412d30583a4074 (patch) | |
tree | d70ff8a043c9ed6938c925bc354b4dca8ff31060 /activesupport/CHANGELOG.md | |
parent | 53ede1aff2025d4391d0e05ba471fdaf3110a99c (diff) | |
parent | 607a6c7a9a6fb3d8bd7d08d0307018b626105d83 (diff) | |
download | rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.tar.gz rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.tar.bz2 rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.zip |
Merge pull request #26677 from tbalthazar/26644
Fix `ActiveSupport::TimeWithZone#localtime`
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index f840783059..499310975e 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,25 @@ +* Fix `ActiveSupport::TimeWithZone#localtime` when called with different + `utc_offset` values. + + Previously memoization in `localtime` wasn't taking the `utc_offset` + parameter into account when returning a cached value. It now caches the + computed value depending on the `utc_offset` parameter, e.g: + + Time.zone = "US/Eastern" + + t = Time.zone.local(2016,5,2,11) + # => Mon, 02 May 2016 11:00:00 EDT -04:00 + + t.localtime(-7200) + # => 2016-05-02 13:00:00 -0200 + + t.localtime(-3600) + # => 2016-05-02 14:00:00 -0100 + + Fixes #26644. + + *Thomas Balthazar* + * Fix `ActiveSupport::TimeWithZone#in` across DST boundaries. Previously calls to `in` were being sent to the non-DST aware |