Created
May 12, 2014 14:10
-
-
Save cmcdevitt/10d5f75d0913a27082c8 to your computer and use it in GitHub Desktop.
Unix Epoch to Date
This file contains 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 newDate = new Date( ); | |
var unix = 1399665294; | |
newDate.setTime(unix*1000); // JavaScript is in milliseconds and unix is in seconds | |
dateString = newDate.toUTCString(); | |
gs.log("Epoch: " + dateString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment