Perl Tit-Bits 001
* Date-time conversion from "YYYY-MM-DD HH:MI:SS" to unix epoch
[ Ref: http://www.varioustopics.com/general-linux-discussion/704132-date-time-conversion-from-yyyy-mm-dd-hh-mi-ss-to-unix-epoch.html ]
% perl -MDate::Manip -le 'print UnixDate(ParseDate("2002-07-04 12:34:56"),"%s")'
1025804096
% perl -le 'print scalar localtime(1025804096)'
Thu Jul 4 12:34:56 2002
Thu Jul 4 12:34:56 2002
Comments