in reply to how to calculate time that looks like 1138597506

I want to create a very simple CGI script

CGI? Why? This alias works for me.

alias unixtime="perl -MTime::ParseDate -le'print parsedate(\"@ARGV\", +ZONE=>\"GMT\")'"
Call it like:
$ unixtime Thu Feb 8 15:28:00 2007
or
$ unixtime 2/8/07 3:28pm
or
$ unixtime 2-8-2007 15:28
or
$ unixtime `date`
or ... well, you get the idea. It's pretty good at figuring out what you mean.

-sauoq
"My two cents aren't worth a dime.";