Steffen Kluge wrote:
On Wed, 2006-04-19 at 13:53 +0100, Paul Howarth wrote:
Back again:
$ TIMESTAMP=1145448136
$ awk 'BEGIN { print strftime("%a, %d %b %Y %H:%M:%S %z", '$TIMESTAMP')
}' < /dev/null
Wed, 19 Apr 2006 13:02:16 +0100
Here's my shorthand for this:
$ perl -e "print scalar localtime $TIMESTAMP"
Or by just using date for both directions:
[static@localhost ~]$ date -d "@1145448136"
Wed Apr 19 08:02:16 EDT 2006
[static@localhost ~]$ date -d "Wed Apr 19 08:02:16 EDT 2006" "+%s"
1145448136
Cheers
Steffen