Changed time() to strtotime('today')