@Claire I don't understand, what is wrong with this?

> new Date('2022-05-05T23:50:00').toISOString();

@val the required output is expected to be timezone-less iso8601 and not have the Z bit, hence the slice; i have read in many places that parsing dates without timezone spec isn't reliable

@Claire I see.
Well anyway, make sure you test it on the hour DST ends, because ISO8601 doesn't have a DST fold bit

@val not sure what to test for honestly, since the date picker is in local time, the UI can't give you the option to distinguish between 3am before DST ends and 3am after DST ends, can it

@val yeah it doesn't explode into a fire, but datetime-local can't express the difference, so i don't know what we should do here

Sign in to participate in the conversation

oc.todon.fr is a mostly French-speaking Mastodon instance with an active moderation. oc.todon.fr est une instance Mastodon principalement francophone et avec une modération active.