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