regress-58116.js (1121B)
1 // |reftest| skip-if(this.hasOwnProperty("Intl")) -- Requires inaccurate historic time zone data. 2 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 3 /* 4 * Any copyright is dedicated to the Public Domain. 5 * http://creativecommons.org/licenses/publicdomain/ 6 * Contributor: Bob Clary 7 */ 8 9 // SKIP test262 export 10 // Depends on ambient time zone. 11 12 //----------------------------------------------------------------------------- 13 var BUGNUMBER = 58116; 14 var summary = 'Compute Daylight savings time correctly regardless of year'; 15 var actual = ''; 16 var expect = ''; 17 var status; 18 19 printBugNumber(BUGNUMBER); 20 printStatus (summary); 21 22 expect = (new Date(2005, 7, 1).getTimezoneOffset()); 23 24 status = summary + ' ' + inSection(1) + ' 1970-07-1 '; 25 actual = (new Date(1970, 7, 1).getTimezoneOffset()); 26 reportCompare(expect, actual, status); 27 28 status = summary + ' ' + inSection(2) + ' 1965-07-1 '; 29 actual = (new Date(1965, 7, 1).getTimezoneOffset()); 30 reportCompare(expect, actual, status); 31 32 status = summary + ' ' + inSection(3) + ' 0000-07-1 '; 33 actual = (new Date(0, 7, 1).getTimezoneOffset()); 34 reportCompare(expect, actual, status);