diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 16:53:16 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 16:53:16 +0000 |
commit | d022e13fd192e526552ae1982d9bacb86d3cd1a8 (patch) | |
tree | 00e53064e90947c3c8e6b7724d97fea6b59185d3 | |
parent | 13cea1f30d429c563961ce7a36fee947ca5cb429 (diff) |
merge revision(s) 49162: [Backport #10698]
* time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
VTM_ISDST_INITVAL. This bug is introduced at packing struct
vtm (r45155).
[ruby-core:67345] [Bug #10698] Reported by Boris Ruf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/ruby/test_time_tz.rb | 8 | ||||
-rw-r--r-- | time.c | 2 | ||||
-rw-r--r-- | version.h | 6 |
4 files changed, 19 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Sat Jan 17 01:52:42 2015 Tanaka Akira <akr@fsij.org> + + * time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is + VTM_ISDST_INITVAL. This bug is introduced at packing struct + vtm (r45155). + [ruby-core:67345] [Bug #10698] Reported by Boris Ruf. + Fri Jan 16 21:17:34 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> * test/ruby/test_io.rb: added timeout for AIX environment. diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index 5fb00557c8..6f3e05f4cc 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -155,6 +155,14 @@ class TestTimeTZ < Test::Unit::TestCase } end + def test_europe_berlin + with_tz(tz="Europe/Berlin") { + assert_time_constructor(tz, "2011-10-30 02:00:00 +0100", :local, [2011,10,30,2,0,0], "[ruby-core:67345] [Bug #10698]") + assert_time_constructor(tz, "2011-10-30 02:00:00 +0100", :local, [0,0,2,30,10,2011,nil,nil,false,nil]) + assert_time_constructor(tz, "2011-10-30 02:00:00 +0200", :local, [0,0,2,30,10,2011,nil,nil,true,nil]) + } + end + def test_europe_lisbon with_tz("Europe/Lisbon") { assert_equal("LMT", Time.new(-0x1_0000_0000_0000_0000).zone) @@ -1548,7 +1548,7 @@ timelocalw(struct vtm *vtm) tm.tm_hour = vtm->hour; tm.tm_min = vtm->min; tm.tm_sec = vtm->sec; - tm.tm_isdst = vtm->isdst; + tm.tm_isdst = vtm->isdst == VTM_ISDST_INITVAL ? -1 : vtm->isdst; if (find_time_t(&tm, 0, &t)) goto no_localtime; @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.2.0" -#define RUBY_RELEASE_DATE "2015-01-16" -#define RUBY_PATCHLEVEL 15 +#define RUBY_RELEASE_DATE "2015-01-17" +#define RUBY_PATCHLEVEL 16 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 16 +#define RUBY_RELEASE_DAY 17 #include "ruby/version.h" |