You're effectively adding the timestamp of "today" (time()
) to the timestamp of "today + 5 days" (strtotime('+5 day')
) which, given that the timestamp of "today" is ~40+ years from 0, that makes sense. You can read about Unix time
here for a more in-depth explanation regarding the "starting time".
To fix this, remove the time() +
portion and just use the return value of strtotime('+5 day')
:
$searchTime = date('Y-m-d H:i:s', strtotime("+5 day"));