From: Erik Bryn <redmine@...>
Date: 2010-10-12T14:05:23+09:00
Subject: [ruby-core:32750] [Ruby 1.9-Bug#3931][Open] Timezone offset changing during addition

Bug #3931: Timezone offset changing during addition
http://redmine.ruby-lang.org/issues/show/3931

Author: Erik Bryn
Status: Open, Priority: Normal
Category: core, Target version: 1.9.x
ruby -v: 1.9.2-p0

Here's the original code that I found this bug with:
ruby-1.9.2-p0 > t = Time.local(1900, nil, nil, nil, nil, nil)
 => 1900-01-01 00:00:00 -0800 
ruby-1.9.2-p0 > t + 5_630_617_200
 => 2078-06-05 05:20:00 -0700 

After looking into it further, it seems if I add >2816474399 to t, the timezone offset will change:
ruby-1.9.2-p0 > t + 2816474399
 => 1989-04-02 01:59:59 -0800 
ruby-1.9.2-p0 > t + 2816474400
 => 1989-04-02 03:00:00 -0700


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