Time - UTC (Coordinated Universal Time) standard

1 - About

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.

3 - List

3.1 - Javascript

// 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>

3.2 - Java

see Java - Instant (Moment)

new Date().toInstant()

4 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap