0

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

TheRob
  • 133
  • 2
  • 10

1 Answers1

0
var d1 = new Date("UNIX TIME STAMP HERE");
d1.toUTCString()

Originally asked here: How do I get a UTC Timestamp in JavaScript?

Community
  • 1
  • 1
J0N3X
  • 228
  • 2
  • 14