non-canonical-utc.js (700B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2022 André Bargull. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-temporal.zoneddatetime 7 description: ZonedDateTime constructor accepts link names as time zone ID input 8 features: [Temporal, canonical-tz] 9 ---*/ 10 11 const testCases = [ 12 "Etc/GMT", 13 "Etc/GMT+0", 14 "Etc/GMT-0", 15 "Etc/GMT0", 16 "Etc/Greenwich", 17 "Etc/UCT", 18 "Etc/UTC", 19 "Etc/Universal", 20 "Etc/Zulu", 21 ]; 22 23 for (let id of testCases) { 24 let instance = new Temporal.ZonedDateTime(0n, id); 25 26 assert.sameValue(instance.timeZoneId, id); 27 } 28 29 reportCompare(0, 0);