A Unix time is basically counted from January 1, 1970. It is neither a linear representation of time nor a true representation of UTC (Coordinated Universal Time). There are two ways to convert a unix time to human readable format. First is using the below bash script:
Code:
!#/bin/bash
EPOCH=1000000000
DATE=$(perl -e “require ‘ctime.pl’; print &ctime($EPOCH);”)
echo $DATE
DATE=$(perl -e “print scalar(localtime($EPOCH))”)
echo $DATE
DATE=$(echo $EPOCH|awk ‘{print strftime(”%c”,$1)}’)
echo $DATE
The second is use an online site to convert the Unix time to normal time.
Bookmarks