Converts a datetime-local value, read as local time, to an RFC 3339 UTC string.
datetime-local
Value such as 2025-01-31T14:05 or 2025-01-31T14:05:30.
2025-01-31T14:05
2025-01-31T14:05:30
The time from Date.toISOString(), e.g. 2025-01-31T19:05:00.000Z in UTC-5.
Date.toISOString()
2025-01-31T19:05:00.000Z
Error if the value is not a valid date.
Converts a
datetime-localvalue, read as local time, to an RFC 3339 UTC string.