Use the GNU date command with your desired format from Formatting Dates for Display:
EPOCH='1131173989' $ date -d "1970-01-01 UTC $EPOCH seconds" +"%Y-%m-%d %T %z" 2005-11-05 01:59:49 -0500 $ date --utc --date "1970-01-01 $EPOCH seconds" +"%Y-%m-%d %T %z" 2005-11-05 06:59:49 +0000
Since Epoch seconds are simply the number of seconds since the Epoch (which is Midnight on January 1, 1970, also known as 1970-01-01T00:00:00), this command starts at the Epoch, adds the Epoch seconds, and displays the date and time as you wish.
If you don’t have GNU date on your system you can try one of these Perl one-liners:
EPOCH='1131173989' $ perl -e "print scalar(gmtime($EPOCH)), qq( );" # UTC Sat Nov 5 06:59:49 2005 $ perl -e "print scalar(localtime($EPOCH)), qq( );" # Your local time Sat Nov 5 01:59:49 2005 $ perl -e "use POSIX qw(strftime); print strftime('%Y-%m-%d %H:%M:%S', localtime($EPOCH)), qq( );" 2005-11-05 01:59:49
man date
“Date and Time String Formatting with strftime” in Appendix A
3.15.219.217