Skip to content

Instantly share code, notes, and snippets.

@lucasrizoli
Created March 12, 2012 20:30
Show Gist options
  • Save lucasrizoli/2024505 to your computer and use it in GitHub Desktop.
Save lucasrizoli/2024505 to your computer and use it in GitHub Desktop.
Bookmarklet for converting UNIX/POSIX timestamp to date and time
javascript:(function(a){var b=parseInt(a.replace(/[\s|,]/g,""),10);alert(isNaN(b)?'"'+a+"\" doesn't look like a UNIX timestamp.":'"'+a+'" is\n'+new Date(b*(b>1e12?1:1e3)));})(window.getSelection().toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment