Skip to content

Commit ed0dcb2

Browse files
Fix formatDateTime test case to avoid timezone issues
1 parent c5fc622 commit ed0dcb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

date/formatDateTime.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ describe("formatDateTime", () => {
1414
});
1515

1616
it("should include seconds display if enabled", () => {
17-
const a = new Date("2019-02-15T12:00:00Z");
18-
const b = new Date("2019-02-23T23:30:59Z");
19-
const c = new Date("2019-02-24T01:12:34Z");
17+
const a = new Date("2019-02-15T12:00:00");
18+
const b = new Date("2019-02-23T23:30:59");
19+
const c = new Date("2019-02-24T01:12:34");
2020

21-
expect(formatDateTime(a, true)).toEqual("2019-02-15 13:00:00");
22-
expect(formatDateTime(b, true)).toEqual("2019-02-24 00:30:59");
23-
expect(formatDateTime(c, true)).toEqual("2019-02-24 02:12:34");
21+
expect(formatDateTime(a, true)).toEqual("2019-02-15 12:00:00");
22+
expect(formatDateTime(b, true)).toEqual("2019-02-23 23:30:59");
23+
expect(formatDateTime(c, true)).toEqual("2019-02-24 01:12:34");
2424
});
2525

2626
it("does not include seconds display by default", () => {

0 commit comments

Comments
 (0)