Skip to content

Instantly share code, notes, and snippets.

@DamianZaremba
Created July 10, 2011 21:52
Show Gist options
  • Save DamianZaremba/1075010 to your computer and use it in GitHub Desktop.
Save DamianZaremba/1075010 to your computer and use it in GitHub Desktop.
Unix time to human readable examples
root@localhost [/]# date -d@1290705757 +"%H:%M:%S %d/%m/%Y"
18:22:37 25/11/2010
root@localhost [/]# date -d @1290705757
Thu Nov 25 18:22:37 CET 2010
root@localhost [/var/cpanel/users]# for user in *; do echo -n "$user: "; date -d@$(grep STARTDATE $user | cut -d’=’ -f2); done
damian: Thu Nov 18 21:17:44 CET 2010
test: Mon Nov 8 00:01:04 CET 2010
bob: Mon Nov 15 17:34:18 CET 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment