1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibJS: Implement the ECMA-402 definition of DefaultTimeZone

Simply defer to LibTimeZone to retrieve the system's current time zone.
Also update some Temporal tests to explicitly set the time zone to UTC.
This commit is contained in:
Timothy Flynn 2022-01-11 23:23:41 -05:00 committed by Linus Groh
parent bdf02c21e1
commit f6786881aa
6 changed files with 10 additions and 10 deletions

View file

@ -15,7 +15,7 @@ describe("correct behavior", () => {
return 86400000000000;
},
};
const plainDate = Temporal.Now.plainDateISO();
const plainDate = Temporal.Now.plainDateISO("UTC");
const plainDateWithOffset = Temporal.Now.plainDateISO(timeZone);
if (plainDate.dayOfYear === plainDate.daysInYear) {
expect(plainDateWithOffset.year).toBe(plainDate.year + 1);