You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new Date doesn't work with the output of toLocaleString, so that conversion doesn't work. For example:
constdate=Date(2022,3,20);date.toLocaleString("en-US",{timeZone: "Europe/Madrid"});// This outputs: '4/20/2022, 12:00:00 AM'newDate('4/20/2022, 12:00:00 AM');// This returns an Invalid Date
Describe the bug
I'm getting an Invalid Date error when changing the timezone with dayjs.
It is related to the
src/plugin/timezone/index.js
file, line 98 and 99.new Date
doesn't work with the output oftoLocaleString
, so that conversion doesn't work. For example:This makes this code to return an Invalid Date:
Expected behavior
I expected the method
tz
to return a valid dayjs object in the requested timezone.Information
The text was updated successfully, but these errors were encountered: