I have an Expo project and use date-fns and date-fns-tz to manipulate time and timezones.
Regarless of the timezone I use (Europe/Paris, UTC, America/New_York'...), I get the following error:
Invalid time zone specified: Europe/Paris
I've tried to copy/paste the example from the documentation, but same thing.
Here is a code snippet:
import { formatDuration, intervalToDuration, parseISO } from "date-fns";
import { formatInTimeZone} from "date-fns-tz";
formatInTimeZone(
date,
"Europe/Paris",
"yyyy-MM-dd HH:mm:ssXXX"
);
I've tried the solution described here but my app gets errors.
Using "date-fns": "^2.16.1"
and "date-fns-tz": "^1.3.7"
.