Project

General

Profile

Actions

Bug #8885

closed

Incorrect time is created for time including leap seconds

Added by sawa (Tsuyoshi Sawada) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
2.0
[ruby-core:57102]

Description

=begin
Time.new creates incorrect time when the time includes a leap second.

Time.new(2012, 6, 30, 23, 59, 60)
# => 2012-07-01 00:00:00 +0900 # Wrong. Should be 2012-06-30 23:59:60 +0900

Time.new(2012, 6, 30, 23, 59, 60) == Time.new(2012, 7, 1, 0, 0, 0)
# => true # Wrong. Should be `false`.

=end

Actions

Also available in: Atom PDF