diff --git a/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js b/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js new file mode 100644 index 0000000000..a2f1132c7a --- /dev/null +++ b/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js @@ -0,0 +1,14 @@ +/** + * @jest-environment ../../../__tests__/setup/jestNodeEnvironmentWithTimezone.js + * @timezone America/St_Johns + */ + +import dateToLocaleISOString from './dateToLocaleISOString'; + +test('formatting a time in Cananda, Newfoundland timezone', () => { + // eslint-disable-next-line no-magic-numbers + const date = new Date(Date.UTC(2000, 0, 1, 0, 12, 34, 567)); + const actual = dateToLocaleISOString(date); + + expect(actual).toMatchInlineSnapshot(`"2000-01-01T09:12:34.567-03:30"`); +});