PHP: strtotime is returning false for a future date?

If you want to work with dates that fall outside the 32-bit integer date range, then use PHP’s dateTime objects

try {
    $date = new DateTime('2110-07-16 10:07:47');
} catch (Exception $e) {
    echo $e->getMessage();
    exit(1);
}

echo $date->format('Y-m-d');

Leave a Comment