From 0f8d2794f229175447163d2b5e16d94d2cee5468 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sun, 27 Feb 2011 20:24:39 +0100 Subject: updated Time, Date and DateTime current methods in AS to use Time.zone and not Time.zone_default. [#6410 state:committed] --- activesupport/lib/active_support/core_ext/time/calculations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/time/calculations.rb') diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index fa052fa86b..6e4b69f681 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -41,9 +41,9 @@ class Time time_with_datetime_fallback(:local, *args) end - # Returns Time.zone.now when config.time_zone is set, otherwise just returns Time.now. + # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. def current - ::Time.zone_default ? ::Time.zone.now : ::Time.now + ::Time.zone ? ::Time.zone.now : ::Time.now end end -- cgit v1.2.3