Created
November 3, 2019 03:03
-
-
Save johnmurch/c82136c52c3f89e5e086315510392775 to your computer and use it in GitHub Desktop.
Convert EPOCH to Date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var utcSeconds = 1234567890; | |
var d = new Date(0); // The 0 there is the key, which sets the date to the epoch | |
d.setUTCSeconds(utcSeconds); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment