ruby-changes:42063
From: odaira <ko1@a...>
Date: Thu, 17 Mar 2016 08:20:19 +0900 (JST)
Subject: [ruby-changes:42063] odaira:r54137 (trunk): * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values
odaira 2016-03-17 08:20:14 +0900 (Thu, 17 Mar 2016) New Revision: 54137 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54137 Log: * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values are the same only when both or neither of the Time objects are in summer time (daylight-saving time). Modified files: trunk/ChangeLog trunk/test/-ext-/time/test_new.rb Index: test/-ext-/time/test_new.rb =================================================================== --- test/-ext-/time/test_new.rb (revision 54136) +++ test/-ext-/time/test_new.rb (revision 54137) @@ -23,7 +23,9 @@ class Bug::Time::Test_New < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/-ext-/time/test_new.rb#L23 assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0).utc?) assert_equal(true, Bug::Time.timespec_new(1447087832, 476451125, 0x7ffffffe).utc?) assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).utc?) - assert_equal(Time.now.gmtoff, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff) + if Time.now.isdst == Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).isdst + assert_equal(Time.now.gmtoff, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff) + end assert_time_equal(Time.at(1447087832, 476451.125).localtime(86399), Bug::Time.timespec_new(1447087832, 476451125, 86399)) assert_time_equal(Time.at(1447087832, 476451.125).localtime(-86399), Index: ChangeLog =================================================================== --- ChangeLog (revision 54136) +++ ChangeLog (revision 54137) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Mar 17 08:13:43 2016 Rei Odaira <Rei.Odaira@g...> + + * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff values + are the same only when both or neither of the Time objects are in + summer time (daylight-saving time). + Thu Mar 17 07:17:36 2016 Eric Hodel <drbrain@s...> * marshal.c (r_object0): raise ArgumentError when linking to undefined -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/