Issue #8885 has been updated by no6v (Nobuhiro IMAI).


=begin
Which is your timezone? I guess it works correctly.

 RUBY_DESCRIPTION # => "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]"
 ENV["TZ"] = "UTC"
 Time.new(2012, 6, 30, 23, 59, 60) # => 2012-07-01 00:00:00 +0000
 ENV["TZ"] = "right/UTC"
 Time.new(2012, 6, 30, 23, 59, 60) # => 2012-06-30 23:59:60 +0000
 ENV["TZ"] = "Japan"
 Time.new(2012, 6, 30, 23, 59, 60) # => 2012-07-01 00:00:00 +0900
 Time.new(2012, 7, 1, 8, 59, 60)   # => 2012-07-01 09:00:00 +0900
 ENV["TZ"] = "right/Japan"
 Time.new(2012, 6, 30, 23, 59, 60) # => 2012-07-01 00:00:00 +0900
 Time.new(2012, 7, 1, 8, 59, 60)   # => 2012-07-01 08:59:60 +0900
=end

----------------------------------------
Bug #8885: Incorrect time is created for time including leap seconds
https://bugs.ruby-lang.org/issues/8885#change-41714

Author: sawa (Tsuyoshi Sawada)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 2.0
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


=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


-- 
http://bugs.ruby-lang.org/