From ccad803bf44fe30602a041ff0ab1cbe985bc3840 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Tue, 9 Jul 2013 14:04:49 +0100 Subject: Retain offset and fraction when using Time.at_with_coercion The standard Ruby behavior for Time.at is to return the same type of time when passing an instance of Time as a single argument. Since the an ActiveSupport::TimeWithZone instance may be a different timezone than the system timezone and DateTime just understands offsets the best we can do is to return an instance of Time with the correct offset. It also maintains the correct fractional second value as well. Fixes #11350. Backports: 484253515c0e05760541dc48946361185c9e6904 1b3873730b96035a238dbff7627bd5942e6dc4e7 --- activesupport/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 79bccf6d7e..21a726bfc1 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,5 +1,11 @@ ## unreleased ## +* Make `Time.at_with_coercion` retain the second fraction and offset from UTC. + + Fixes #11350 + + *Neer Friedman*, *Andrew White* + * Fix `ActiveSupport::TaggedLogging` incorrectly providing program name the same as log message even when block is not provided. -- cgit v1.2.3