79527971

Date: 2025-03-22 19:15:36
Score: 0.5
Natty:
Report link

Using the upcoming Temporal API (or a polyfill):

const legacyDate = new Date()
const timeZoneId = 'Asia/Tokyo'
const zonedDateTime = legacyDate.toTemporalInstant().toZonedDateTimeISO(timeZoneId)
const rfc9557 = zonedDateTime.toString()
// "2025-03-23T04:02:09.087+09:00[Asia/Tokyo]"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alexandre Dieulot