mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 05:55:36 +02:00
Merge pull request #534 from mythrialle/master
Removes special handling for UTC timezone in toISOString/15.9.5.43-0-1…
This commit is contained in:
commit
a432cde542
@ -5,19 +5,11 @@
|
|||||||
es5id: 15.9.5.43-0-13
|
es5id: 15.9.5.43-0-13
|
||||||
description: >
|
description: >
|
||||||
Date.prototype.toISOString - RangeError is thrown when value of
|
Date.prototype.toISOString - RangeError is thrown when value of
|
||||||
date is Date(1970, 0, 100000001, 0, 0, 0, 1), the time zone is
|
date is outside the valid range of time.
|
||||||
UTC(0)
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);
|
// As specified in ES5 15.9.1.14, time > 8.64e15 is not in the valid range.
|
||||||
var date, dateStr;
|
var date = new Date(8.64e15 + 1);
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(RangeError, function() {
|
||||||
if (timeZoneMinutes > 0) {
|
date.toISOString();
|
||||||
date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes + 60, 0, 1);
|
|
||||||
dateStr = date.toISOString();
|
|
||||||
} else {
|
|
||||||
date = new Date(1970, 0, 100000001, 0, 0, 0, 1);
|
|
||||||
dateStr = date.toISOString();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user