mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:37:34 +00:00
LibJS+LibTimeZone: Begin handling DST when computing time zone offsets
This also updates some expectations in a Temporal time zone offset test that is using a time stamp which is in DST for a few time zones.
This commit is contained in:
parent
9dd4602636
commit
42c9c57141
3 changed files with 91 additions and 17 deletions
|
@ -9,15 +9,15 @@ describe("correct behavior", () => {
|
|||
["GMT", "+00:00"],
|
||||
["Etc/GMT+12", "-12:00"],
|
||||
["Etc/GMT-12", "+12:00"],
|
||||
["Europe/London", "+00:00"],
|
||||
["Europe/Berlin", "+01:00"],
|
||||
["America/New_York", "-05:00"],
|
||||
["America/Los_Angeles", "-08:00"],
|
||||
["Europe/London", "+01:00"],
|
||||
["Europe/Berlin", "+02:00"],
|
||||
["America/New_York", "-04:00"],
|
||||
["America/Los_Angeles", "-07:00"],
|
||||
["+00:00", "+00:00"],
|
||||
["+01:30", "+01:30"],
|
||||
];
|
||||
for (const [arg, expected] of values) {
|
||||
const instant = new Temporal.Instant(1600000000000000000n);
|
||||
const instant = new Temporal.Instant(1600000000000000000n); // Sunday, September 13, 2020 12:26:40 PM
|
||||
expect(new Temporal.TimeZone(arg).getOffsetStringFor(instant)).toBe(expected);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue