I faced such a problem that I have two dates: today and entered by the user and I needed to compare them. The code itself looks like this:
$tim = strtotime(date('Ym-d'))-strtotime($_POST['_bt']); But the problem is that if the date is in $ _POST ['_ bt'] before 1.1.1970, then the output simply does not occur.