Open gabrielbull opened 1 year ago
Consider this code in node:
process.env.TZ = "America/New_York"; const { parseISO } = require("date-fns"); const { formatInTimeZone } = require("date-fns-tz"); console.log(formatInTimeZone(parseISO("2024-03-09T02:00:00.000Z"), "UTC", "h:mm aaaa")); console.log(formatInTimeZone(parseISO("2024-03-10T02:00:00.000Z"), "UTC", "h:mm aaaa"));
Outputs this:
2:00 a.m. 3:00 a.m.
But should output this:
2:00 a.m. 2:00 a.m.
The same issue is reproducible in the browser when the user has a timezone that has DTS.
I'm experiencing the same issue
Consider this code in node:
Outputs this:
But should output this:
The same issue is reproducible in the browser when the user has a timezone that has DTS.