diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2008-04-04 03:29:30 +0000 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2008-04-04 03:29:30 +0000 |
commit | 49f2e6f8d4002185b53f7108463a50b55e4aa86e (patch) | |
tree | 2f43d44693b525502c9dd9bb143029f112c68be4 /activesupport/lib/active_support | |
parent | cfe42ba1b19c5ee96a268dbb85cece16c0cc354b (diff) | |
download | rails-49f2e6f8d4002185b53f7108463a50b55e4aa86e.tar.gz rails-49f2e6f8d4002185b53f7108463a50b55e4aa86e.tar.bz2 rails-49f2e6f8d4002185b53f7108463a50b55e4aa86e.zip |
Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes #7399 [sblackstone]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/calculations.rb | 4 |
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 867ac86617..0bc83af709 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -221,12 +221,12 @@ module ActiveSupport #:nodoc: # Convenience method which returns a new Time representing the time 1 day ago def yesterday - self.ago(1.day) + advance(:days => -1) end # Convenience method which returns a new Time representing the time 1 day since the instance time def tomorrow - self.since(1.day) + advance(:days => 1) end def plus_with_duration(other) #:nodoc: |