1

I need to get the utc time in secs ( for Wed Nov 07 00:50:28 GMT I need it to return: 1352249428 )

I have this code right now:

current_date = new Date()
var x_timestamp = current_date.getUTCSeconds();

but it's returning 28.00

Help. Thanks

XIPE
  • 15
  • 3

1 Answers1

0

Try calling UTC off your date object and dividing that result by 1000.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445