Changeset 8853
- Timestamp:
- 02/10/08 20:35:47 (7 months ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/time_with_zone.rb (modified) (1 diff)
- trunk/activesupport/test/core_ext/time_with_zone_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r8852 r8853 1 1 *SVN* 2 3 * TimeWithZone #in_time_zone returns +self+ if zone argument is the same as #time_zone [Geoff Buesing] 2 4 3 5 * Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822 [Geoff Buesing] trunk/activesupport/lib/active_support/time_with_zone.rb
r8852 r8853 30 30 # Returns the simultaneous time in the specified zone 31 31 def in_time_zone(new_zone) 32 return self if time_zone == new_zone 32 33 utc.in_time_zone(new_zone) 33 34 end trunk/activesupport/test/core_ext/time_with_zone_test.rb
r8852 r8853 25 25 def test_in_time_zone 26 26 assert_equal ActiveSupport::TimeWithZone.new(@utc, TimeZone['Alaska']), @twz.in_time_zone('Alaska') 27 end 28 29 def test_in_time_zone_with_new_zone_equal_to_old_zone_does_not_create_new_object 30 assert_equal @twz.object_id, @twz.in_time_zone(TimeZone['Eastern Time (US & Canada)']).object_id 27 31 end 28 32