Time - UTC (Coordinated Universal Time) standard


UTC is the primary time standard by which the world regulates clocks and time.

It's the consensus international time scale (with leap seconds).

Time zones are expressed using positive or negative offsets from UTC.

UTC permits a day to have 86399 seconds or 86401 seconds where necessary in order to keep the day aligned with the Sun.

The UTC time-scale was introduced in 1972, introducing the concept of whole leap-seconds.



// Now
var now = new Date(); 

// now_utc is an epoch number
var now_utc_number =  Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(),now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());

// To string
console.log(new Date(now_utc_number).toISOString());
  • Result: <note tip>The timezone offset is zero as denoted by the suffix Z</note>


see Java - Instant (Moment)

new Date().toInstant()

Documentation / Reference

Powered by ComboStrap