JS Date Formats
Use a standard ISO date-time string with an explicit offset for exchanged timestamps. Avoid ambiguous numeric date strings.
Where to run this
This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.
A practical example
const instant = new Date("2026-11-07T10:00:00+00:00");
console.log(instant.toISOString());
What happens
The timestamp represents 10:00 UTC on 7 November 2026.