Issue #6135 has been reported by Jeremy Evans.

----------------------------------------
Bug #6135: DateTime.now incorrect offset on Windows after daylight savings time change
https://bugs.ruby-lang.org/issues/6135

Author: Jeremy Evans
Status: Open
Priority: Normal
Assignee: tadayoshi funaba
Category: 
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16) [i386-mingw32]


    C:\>ruby -v -r date -e 'p Time.now; p DateTime.now'
    ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
    2012-03-12 14:55:05 -0700
    #<DateTime: 2012-03-12T14:55:05-08:00 ((2455999j,82505s,413234000n),-28800s,2299161j)>

Note how the DateTime offset is -08:00 (incorrect) while the Time offset is -0700 (correct).  This probably started happening yesterday, March 11, since that is the start of daylight savings time in the United States.  My guess is that DateTime is somehow using the pre-2007 daylight savings time cutoffs (first Sunday in April instead of second Sunday in March), but that's not an informed guess.

This doesn't happen in ruby 1.9.2, so it's probably related to the new 1.9.3 date C extension (switch_hitter).  Operating system is Windows XP SP3.


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