Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: check jquery version in chrome 
Javascript :: document delete element 
Javascript :: react material ui button router link 
Javascript :: js delete duplicates from array 
Javascript :: delete cr eslint 
Javascript :: jquery show flex 
Javascript :: jquery how to know if element is visible 
Javascript :: kendo angular grid date format 
Javascript :: get button text javascript 
Javascript :: javascript generate random number based on date 
Javascript :: ReferenceError: fetch is not defined 
Javascript :: find base url in javascript 
Javascript :: node js on ctrl c 
Javascript :: nodejs server fetch is not defined 
Javascript :: d3.js clear svg 
Javascript :: how to find next multiple of 5 in javascript 
Javascript :: open a new tab when clicking on a link react 
Javascript :: javascript round 2 decimals 
Javascript :: javascript window alert 
Javascript :: Unhandled rejection TypeError: Article.findById is not a function sequelize 
Javascript :: active link color different in react js 
Javascript :: angular reactive form remove validation 
Javascript :: delete empty values from object js 
Javascript :: dotenv jest 
Javascript :: increment day date javascript 
Javascript :: pdf darkmode 
Javascript :: addeventlistener keydown 
Javascript :: preg_replace javascript 
Javascript :: remove multiple values from array javascript 
Javascript :: javascript sort array with objects 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =