How to get UTC (GMT) time using JavaScript

 

GMT time

 

//Get timestamp in locale 
var tDate = new Date(); 

//Convert timestamp in GMT/UTC format 
var utcDate = tDate.toUTCString(); 

Tags:

Share:

Related posts