Been struggling with a new script I'm porting over from bash because
perl's DBI is much more elegant than my previous usage of sqsh.

I'm having trouble converting from a datetime into a unix epoch
timestamp.

under bash, this is done.

date = YYYY-MM-DD HH:MM:SS
epoch_date = date -d "$date" +%s

$date
Mon Aug 13 14:39:48 MYT 2007
$date -d "2007-08-13 14:39:48" +%s
1186987188

Under perl, I have no idea how this can be achieved.
Neither localtime, timelocal or AFAICT, DateTime can achieve this
easily.


-- 
[EMAIL PROTECTED] mailing list

Reply via email to