Skip to content

Commit 2bf206d

Browse files
committedMar 14, 2016
Fix an rb_time_timespec_new spec
For time zones with daylight saving time in effect, `Time.now` has a DST offset, while the extension function returns a time object in standard time offset.
1 parent 477db7c commit 2bf206d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎spec/ruby/optional/capi/time_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274

275275
it "returns time object in localtime if offset given equals INT_MAX" do
276276
@s.rb_time_timespec_new(1447087832, 476451125, 0x7fffffff).should == Time.at(1447087832, 476451.125).localtime
277-
@s.rb_time_timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff.should == Time.now.gmtoff
277+
@s.rb_time_timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff.should == Time.local(2016).gmtoff
278278
end
279279

280280
it "raises an ArgumentError if offset passed is not within range of -86400 and 86400 (exclusive)" do

0 commit comments

Comments
 (0)
Please sign in to comment.