1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

LibJS: Don't validate time zone name when parsing Instant string

This is normative change in the Temporal spec.

See: 2a81fbc
This commit is contained in:
Linus Groh 2022-01-13 00:34:12 +01:00
parent 6394ff4ea8
commit b9093dd0ab
5 changed files with 119 additions and 76 deletions

View file

@ -18,6 +18,11 @@ describe("correct behavior", () => {
expect(Temporal.Instant.from("1975-02-02T14:25:36.123456789Z").epochNanoseconds).toBe(
160583136123456789n
);
// Time zone is not validated
expect(
Temporal.Instant.from("1975-02-02T14:25:36.123456789Z[Custom/TimeZone]")
.epochNanoseconds
).toBe(160583136123456789n);
});
});