Created
April 19, 2014 02:24
-
-
Save twhid/11071931 to your computer and use it in GitHub Desktop.
BBEdit Text Filter to transform unix timestamp to human a readable string in the UTC time zone.
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
#!/usr/local/bin/node | |
// Note that a more standard node hashbang doesn't seem to work | |
// in a BBEdit Text Filter (or perhaps it's Homebrew installed node weirdness). | |
// So, change the hashbang to a path to your node executable | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('data', function (data) { | |
process.stdout.write((new Date(data * 1000)).toUTCString()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment