From: boris@... Date: 2015-01-05T20:53:04+00:00 Subject: [ruby-core:67345] [ruby-trunk - Bug #10698] [Open] Time#local behaves differently during clock change Issue #10698 has been reported by Boris Ruf. ---------------------------------------- Bug #10698: Time#local behaves differently during clock change https://bugs.ruby-lang.org/issues/10698 * Author: Boris Ruf * Status: Open * Priority: Low * Assignee: Nobuyoshi Nakada * Category: lib * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 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/