I saw this
date -d @1332468005 '+%Y-%m-%d %H:%M:%S'
Resulting in :
How can I convert it back from
2012-03-22 22:00:05 to
1332468005 with bash shell?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
man date will give you the details of how to use the date command.
To convert long date in standard format into Unix epoc time (%s):
date -d '2012-03-22 22:00:05 EDT' +%s