[前][次][番号順一覧][スレッド一覧]

ruby-changes:37203

From: naruse <ko1@a...>
Date: Sat, 17 Jan 2015 01:53:28 +0900 (JST)
Subject: [ruby-changes:37203] naruse:r49284 (ruby_2_2): merge revision(s) 49162: [Backport #10698]

naruse	2015-01-17 01:53:16 +0900 (Sat, 17 Jan 2015)

  New Revision: 49284

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49284

  Log:
    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.

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/test/ruby/test_time_tz.rb
    branches/ruby_2_2/time.c
    branches/ruby_2_2/version.h
Index: ruby_2_2/time.c
===================================================================
--- ruby_2_2/time.c	(revision 49283)
+++ ruby_2_2/time.c	(revision 49284)
@@ -1548,7 +1548,7 @@ timelocalw(struct vtm *vtm) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/time.c#L1548
     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;
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 49283)
+++ ruby_2_2/ChangeLog	(revision 49284)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Sat Jan 17 01:52:42 2015  Tanaka Akira  <akr@f...>
+
+	* 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@g...>
 
 	* test/ruby/test_io.rb: added timeout for AIX environment.
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 49283)
+++ ruby_2_2/version.h	(revision 49284)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #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"
 
Index: ruby_2_2/test/ruby/test_time_tz.rb
===================================================================
--- ruby_2_2/test/ruby/test_time_tz.rb	(revision 49283)
+++ ruby_2_2/test/ruby/test_time_tz.rb	(revision 49284)
@@ -155,6 +155,14 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_time_tz.rb#L155
     }
   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)

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r49162


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]