Answers for "javascript get current time in utc"

19

javascript get current time

var today = new Date();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
Posted by: Guest on March-30-2020
3

javascript get utc time

const now = new Date()

// UTC Date String
now.toUTCString() // "Sun, 30 May 2021 14:59:15 GMT"

// ISO String
now.toISOString() // "2021-05-30T14:59:15.449Z"

// Unix timestamp
Math.floor(now / 1000) // 1622386878
Posted by: Guest on May-30-2021
0

how to get utc time in angular

var d = new Date();

var n = d.getUTCDate();
Posted by: Guest on December-21-2020

Code answers related to "javascript get current time in utc"

Code answers related to "Javascript"

Browse Popular Code Answers by Language