mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	merge revision(s) 62506,62508: [Backport #14438]
test_time_tz.rb: past Japanese DST tzdata fix * test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow the tzdata 2018 fix of Japanese DST transitions (1948-1951). [ruby-core:85373] [Bug #14438] test_time_tz.rb: past Japanese DST tzdata fix * test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix the expected data at the end of DST. [Bug #14438] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@62634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									4828fe38d9
								
							
						
					
					
						commit
						6ea227b9c3
					
				
					 2 changed files with 21 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -84,6 +84,11 @@ class TestTimeTZ < Test::Unit::TestCase
 | 
			
		|||
 | 
			
		||||
  has_right_tz &&= have_tz_offset?("right/America/Los_Angeles")
 | 
			
		||||
  has_lisbon_tz &&= have_tz_offset?("Europe/Lisbon")
 | 
			
		||||
  CORRECT_TOKYO_DST_1951 = with_tz("Asia/Tokyo") {
 | 
			
		||||
    if Time.local(1951, 5, 6, 12, 0, 0).dst? # noon, DST
 | 
			
		||||
      Time.local(1951, 5, 6, 1, 0, 0).dst?   # DST with fixed tzdata
 | 
			
		||||
    end
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  def time_to_s(t)
 | 
			
		||||
    t.to_s
 | 
			
		||||
| 
						 | 
				
			
			@ -126,8 +131,9 @@ class TestTimeTZ < Test::Unit::TestCase
 | 
			
		|||
 | 
			
		||||
  def test_asia_tokyo
 | 
			
		||||
    with_tz(tz="Asia/Tokyo") {
 | 
			
		||||
      assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0])
 | 
			
		||||
      assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59])
 | 
			
		||||
      h = CORRECT_TOKYO_DST_1951 ? 0 : 2
 | 
			
		||||
      assert_time_constructor(tz, "1951-05-06 0#{h+1}:00:00 +1000", :local, [1951,5,6,h,0,0])
 | 
			
		||||
      assert_time_constructor(tz, "1951-05-06 0#{h+1}:59:59 +1000", :local, [1951,5,6,h,59,59])
 | 
			
		||||
      assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28])
 | 
			
		||||
    }
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			@ -329,10 +335,19 @@ America/Managua  Wed Jan  1 05:00:00 1997 UTC = Tue Dec 31 23:00:00 1996 CST isd
 | 
			
		|||
Asia/Singapore  Sun Aug  8 16:30:00 1965 UTC = Mon Aug  9 00:00:00 1965 SGT isdst=0 gmtoff=27000
 | 
			
		||||
Asia/Singapore  Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000
 | 
			
		||||
Asia/Singapore  Thu Dec 31 16:30:00 1981 UTC = Fri Jan  1 00:30:00 1982 SGT isdst=0 gmtoff=28800
 | 
			
		||||
End
 | 
			
		||||
  gen_zdump_test CORRECT_TOKYO_DST_1951 ? <<'End' : <<'End'
 | 
			
		||||
Asia/Tokyo  Sat May  5 14:59:59 1951 UTC = Sat May  5 23:59:59 1951 JST isdst=0 gmtoff=32400
 | 
			
		||||
Asia/Tokyo  Sat May  5 15:00:00 1951 UTC = Sun May  6 01:00:00 1951 JDT isdst=1 gmtoff=36000
 | 
			
		||||
Asia/Tokyo  Sat Sep  8 13:59:59 1951 UTC = Sat Sep  8 23:59:59 1951 JDT isdst=1 gmtoff=36000
 | 
			
		||||
Asia/Tokyo  Sat Sep  8 14:00:00 1951 UTC = Sat Sep  8 23:00:00 1951 JST isdst=0 gmtoff=32400
 | 
			
		||||
End
 | 
			
		||||
Asia/Tokyo  Sat May  5 16:59:59 1951 UTC = Sun May  6 01:59:59 1951 JST isdst=0 gmtoff=32400
 | 
			
		||||
Asia/Tokyo  Sat May  5 17:00:00 1951 UTC = Sun May  6 03:00:00 1951 JDT isdst=1 gmtoff=36000
 | 
			
		||||
Asia/Tokyo  Fri Sep  7 15:59:59 1951 UTC = Sat Sep  8 01:59:59 1951 JDT isdst=1 gmtoff=36000
 | 
			
		||||
Asia/Tokyo  Fri Sep  7 16:00:00 1951 UTC = Sat Sep  8 01:00:00 1951 JST isdst=0 gmtoff=32400
 | 
			
		||||
End
 | 
			
		||||
  gen_zdump_test <<'End'
 | 
			
		||||
America/St_Johns  Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600
 | 
			
		||||
America/St_Johns  Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000
 | 
			
		||||
America/St_Johns  Sun Nov  4 02:30:59 2007 UTC = Sun Nov  4 00:00:59 2007 NDT isdst=1 gmtoff=-9000
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,10 @@
 | 
			
		|||
#define RUBY_VERSION "2.4.4"
 | 
			
		||||
#define RUBY_RELEASE_DATE "2018-02-17"
 | 
			
		||||
#define RUBY_PATCHLEVEL 240
 | 
			
		||||
#define RUBY_RELEASE_DATE "2018-03-02"
 | 
			
		||||
#define RUBY_PATCHLEVEL 241
 | 
			
		||||
 | 
			
		||||
#define RUBY_RELEASE_YEAR 2018
 | 
			
		||||
#define RUBY_RELEASE_MONTH 2
 | 
			
		||||
#define RUBY_RELEASE_DAY 17
 | 
			
		||||
#define RUBY_RELEASE_MONTH 3
 | 
			
		||||
#define RUBY_RELEASE_DAY 2
 | 
			
		||||
 | 
			
		||||
#include "ruby/version.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue