new Date().toISIOString() or
toJSON() provide an unambiguous Date and Time and TimeZone Offset:
I want the same formatting, or very similar, but without the restriction to UTC :
Is there a built-in solution that doesn't involve 20 lines of code and battery of unit tests for edge cases?
The timezone offset seems the tricky thing. Things I've looked at don't seem to offer a 'show the timezone offset' option, only timezone names.
calendar: "gregory" day: "2-digit" locale: "en-GB" month: "2-digit" numberingSystem: "latn" timeZone: "Europe/London" year: "numeric"
but to know what time "1st April 2020 12:00 Europe/London" was, requires a world history lookup table of when daylight saving starts and ends.