The toISOString() method of the Date object returns a string of the date the ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). The timezone is always UTC, as denoted by the suffix Z.

    
    const event = new Date('05 October 2011 14:48 UTC');

    const isoString = event.toISOString();

    console.log(isoString);
    // "2011-10-05T14:48:00.000Z"