diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2008-02-10 20:35:47 +0000 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2008-02-10 20:35:47 +0000 |
commit | 8ad5a29cef38cd95aac6553357fc32a6e9e7b411 (patch) | |
tree | 772caf2493a04be6cdf901c8a1bcd05862281038 /activesupport/lib/active_support | |
parent | 8831180b152007c52abb2a03bb351ebc7079c4c4 (diff) | |
download | rails-8ad5a29cef38cd95aac6553357fc32a6e9e7b411.tar.gz rails-8ad5a29cef38cd95aac6553357fc32a6e9e7b411.tar.bz2 rails-8ad5a29cef38cd95aac6553357fc32a6e9e7b411.zip |
TimeWithZone #in_time_zone returns +self+ if zone argument is the same as #time_zone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 517b2bac7f..13f968386a 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -29,6 +29,7 @@ module ActiveSupport # Returns the simultaneous time in the specified zone def in_time_zone(new_zone) + return self if time_zone == new_zone utc.in_time_zone(new_zone) end |