Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/Now/zonedDateTimeISO/time-zone-undefined.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.now.zoneddatetimeiso
7 description: Functions when time zone argument is omitted
8 features: [Temporal]
9 ---*/
10
11 const systemTimeZone = Temporal.Now.timeZoneId();
12
13 const resultExplicit = Temporal.Now.zonedDateTimeISO(undefined);
14 assert.sameValue(resultExplicit.timeZoneId, systemTimeZone, "time zone string should be the system time zone");
15
16 const resultImplicit = Temporal.Now.zonedDateTimeISO();
17 assert.sameValue(resultImplicit.timeZoneId, systemTimeZone, "time zone string should be the system time zone");
18
19 reportCompare(0, 0);