aboutsummaryrefslogtreecommitdiffstats
path: root/test/date/test_date_conv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/date/test_date_conv.rb')
-rw-r--r--test/date/test_date_conv.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/date/test_date_conv.rb b/test/date/test_date_conv.rb
index 8b99970dd7..0d6c456163 100644
--- a/test/date/test_date_conv.rb
+++ b/test/date/test_date_conv.rb
@@ -32,12 +32,10 @@ class TestDateConv < Test::Unit::TestCase
end
def test_to_time__from_datetime
- d = DateTime.new(2004, 9, 19, 1, 2, 3, 9.to_r/24) + 456789.to_r/86400000000
+ d = DateTime.new(2004, 9, 19, 1, 2, 3, 8.to_r/24) + 456789.to_r/86400000000
t = d.to_time
- if t.utc_offset == 9*60*60
- assert_equal([2004, 9, 19, 1, 2, 3, 456789],
- [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.usec])
- end
+ assert_equal([2004, 9, 19, 1, 2, 3, 456789, 8*60*60],
+ [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.usec, t.utc_offset])
d = DateTime.new(2004, 9, 19, 1, 2, 3, 0) + 456789.to_r/86400000000
t = d.to_time.utc