echo $(date +%s)/86400 | bc echo $(($(date +%s)/86400)) let days=$(date +%s)/86400 ; echo $days
If perl is installed:
perl -e ' $days=int(time()/86400);print "$days\n"; '
perl -e 'print time(), "\n" '
date -d @<EPOCH time> Example: date -d @1368023418 Wed May 8 16:30:18 CEST 2013
perl -e "print scalar(localtime(1268727836))"
date -d 'Apr 30 14:40:09 2012' +%s
date -d '14 days ago' +%s
Replace <username> with account in question
passwd -S <username> <username> PS 2013-02-27 7 90 7 14 (Password set, SHA512 crypt.)
date -d "1 January 1970 + $(grep <username> /etc/shadow | awk -F: '{print $3}') days"
date -d '2012-08-08 16:00 UTC' Wed Aug 8 18:00:00 CEST 2012 date -d '2012-12-08 16:00 UTC' Sat Dec 8 17:00:00 CET 2012
date --utc Wed Aug 8 12:35:15 UTC 2012