diff options
Diffstat (limited to 'activesupport/lib/active_support/values')
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 1a37d6f2a4..d087955587 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -285,9 +285,9 @@ module ActiveSupport parts.fetch(:year, now.year), parts.fetch(:mon, now.month), parts.fetch(:mday, now.day), - parts.fetch(:hour, now.hour), - parts.fetch(:min, now.min), - parts.fetch(:sec, now.sec) + parts.fetch(:sec_fraction, 0), + parts.fetch(:hour, 0), + parts.fetch(:min, 0), + parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), parts.fetch(:offset, 0) ) @@ -326,7 +326,7 @@ module ActiveSupport end # Available so that TimeZone instances respond like TZInfo::Timezone - # instances. + # instances. def period_for_utc(time) tzinfo.period_for_utc(time) end |