[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>

I'll try to be brief so we can discuss all this. tl;dr: RubySpec is

19 messages 2015/01/05

[ruby-core:67631] [ruby-trunk - Bug #10698] Time#local behaves differently during clock change

From: naruse@...
Date: 2015-01-16 16:53:37 UTC
List: ruby-core #67631
Issue #10698 has been updated by Yui NARUSE.

Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

ruby_2_2 r49284 merged revision(s) 49162.

----------------------------------------
Bug #10698: Time#local behaves differently during clock change
https://bugs.ruby-lang.org/issues/10698#change-51053

* Author: Boris Ruf
* Status: Closed
* Priority: Low
* Assignee: Nobuyoshi Nakada
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
----------------------------------------
This is probably not a bug but since it changes previous behavior it should be noted somewhere.

Ruby 2.1.5:

~~~
>> ENV['TZ'] = 'Europe/Berlin'
=> "Europe/Berlin"
>> Time.local(2011,10,30,2,0,0).zone
=> "CET"
~~~

Ruby 2.2.0:

~~~
>> ENV['TZ'] = 'Europe/Berlin'
=> "Europe/Berlin"
>> Time.local(2011,10,30,2,0,0).zone
=> "CEST"
~~~

So in older Ruby versions the object represents the time **after** the clock change (within the extra hour), while in Ruby 2.2.0 it represents the time **before** time is set back.



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

In This Thread

Prev Next