For example if you receive a timestamp in Javascript:
1433454951000
How would you create a function to convert the timestamp into UTC like:
2015/6/4 GMT+7
For example if you receive a timestamp in Javascript:
1433454951000
How would you create a function to convert the timestamp into UTC like:
2015/6/4 GMT+7
var d1 = new Date("UNIX TIME STAMP HERE");
d1.toUTCString()
Originally asked here: How do I get a UTC Timestamp in JavaScript?