use Time::Local;
$t1="2001-10-27 14:12:11";
$t2="2001-10-27 14:12:12";
sub CDEMDate {
return (timelocal(substr($_[0],17,2)
,substr($_[0],14,2)
,substr($_[0],11,2)
,substr($_[0], 8,2)
,substr($_[0], 5,2)
,substr($_[0], 0,4))),
(timelocal(substr($_[1],17,2)
,substr($_[1],14,2)
,substr($_[1],11,2)
,substr($_[1], 8,2)
,substr($_[1], 5,2)
,substr($_[1], 0,4)));
}
($t1,$t2) = CDEMDate($t1,$t2);
if ($t1 > $t2) {
print $t1," > ",$t2;
} elsif ($t1 < $t2) {
print $t1," < ",$t2;
} else {
print $t1," = ",$t2;
}