aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time/calculations.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-02-27 20:24:39 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2011-02-28 14:05:49 -0800
commit0f8d2794f229175447163d2b5e16d94d2cee5468 (patch)
treeef64056364232df6c68ce12581ef09f1bdaed5ce /activesupport/lib/active_support/core_ext/time/calculations.rb
parentde9713186d693652deed22cff121b43317e86ef0 (diff)
downloadrails-0f8d2794f229175447163d2b5e16d94d2cee5468.tar.gz
rails-0f8d2794f229175447163d2b5e16d94d2cee5468.tar.bz2
rails-0f8d2794f229175447163d2b5e16d94d2cee5468.zip
updated Time, Date and DateTime current methods in AS to use Time.zone and not Time.zone_default.
[#6410 state:committed]
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time/calculations.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/time/calculations.rb4
1 files changed, 2 insertions, 2 deletions
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 <tt>Time.zone.now</tt> when <tt>config.time_zone</tt> is set, otherwise just returns <tt>Time.now</tt>.
+ # Returns <tt>Time.zone.now</tt> when <tt>Time.zone</tt> or <tt>config.time_zone</tt> are set, otherwise just returns <tt>Time.now</tt>.
def current
- ::Time.zone_default ? ::Time.zone.now : ::Time.now
+ ::Time.zone ? ::Time.zone.now : ::Time.now
end
end