Convert unix time from variable to normal time in AIX

aixdate

-d doesn't work(date: Not a recognized flag: d):

date -d @1141421607

and awk's

awk -vNEXTEXECDATUM="$NEXTEXECDATUM" 'BEGIN { print strftime("%c", NEXTEXECDATUM); exit }'

doesn't work: "awk: 0602-553 Function strftime is not defined."

My question: how can I convert unix time from variable to normal time in AIX?

Best Answer

AIX comes with Perl, so use that for your requirement.

perl -le 'print scalar localtime(shift)' 1141421607
Fri Mar  3 16:33:27 2006