I have the impression Date.now()
is milliseconds since epoch in our local time zone. If that's the case, how can I get milliseconds since epoch in UTC time? This would be the long way I guess:
new Date(new Date().toUTCString()).getTime()
is there a faster way?
Date.now()
and new Date().getTime()
use UTC for time representation.