Вы можете использовать strtotime()
:
<?php
$created = 1323504315;
$timeleft = 144;
$expires = strtotime("+$timeleft hours", $created);
$compare_text = "created: " . date('m/d/Y H:i A',$created) . ", now: " . date('m/d/Y H:i A') . " > expires:" . date('m/d/Y H:i A',$expires);
if (mktime() > $expires) {
echo "The time has expired. ($timeleft, $compare_text)";
} else {
echo "The time has not expired. ($timeleft, $compare_text)";
}
?>
http://codepad.org/WcCObV1z