rubinius/rubinius — pull request #2342 by r-stu31 (2013-05-10 12:23:49+00:00)
Title: Handling of "non-existing" times

The test "Time#gmt_offset returns the correct offset for US Eastern time zone around daylight savings time change" is failing under NetBSD 6.1_RC3/amd64.

There are two problems here, IMO:
1) rubinius handles "non-existing" times incorrectly
2) the test is not precise - it does not check only the "around daylight savings time change"

The patch I hereby submit does not fix 1), only 2). Here are console snippets to illustrate the problem 1):

ruby 1.9.3p393 (2013-02-26) [x86_64-netbsd6.1.]:
```
$ irb
irb(main):001:0> ENV['TZ'] = 'EST5EDT'
=> "EST5EDT"
irb(main):002:0> Time.local(2010,3,14,2,0,0)
=> 2010-03-14 03:00:00 -0400
irb(main):003:0>
```

rubinius 2.0.0.rc1 (1.8.7 03149cef yyyy-mm-dd JI) [x86_64-unknown-netbsd6.1.]:
```
$ ./bin/rbx -X19
irb(main):001:0> ENV['TZ'] = 'EST5EDT'
=> "EST5EDT"
irb(main):002:0> Time.local(2010,3,14,2,0,0)
=> 1969-12-31 18:59:59 -0500
irb(main):003:0>
```

Note: there is no calender time 2010-03-14 02:00:00 in time zone EST5EDT.