diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-02-27 20:24:39 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2011-02-28 14:05:49 -0800 |
commit | 0f8d2794f229175447163d2b5e16d94d2cee5468 (patch) | |
tree | ef64056364232df6c68ce12581ef09f1bdaed5ce /activesupport/lib/active_support/core_ext/date/calculations.rb | |
parent | de9713186d693652deed22cff121b43317e86ef0 (diff) | |
download | rails-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/date/calculations.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date/calculations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb index f34185f22c..724e076407 100644 --- a/activesupport/lib/active_support/core_ext/date/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date/calculations.rb @@ -36,9 +36,9 @@ class Date ::Date.current.tomorrow end - # Returns Time.zone.today when config.time_zone is set, otherwise just returns Date.today. + # Returns Time.zone.today when <tt>Time.zone</tt> or <tt>config.time_zone</tt> are set, otherwise just returns Date.today. def current - ::Time.zone_default ? ::Time.zone.today : ::Date.today + ::Time.zone ? ::Time.zone.today : ::Date.today end end |