PHP Date function on server not returning correct time
When using the php date() function the time is off by as much as forty minutes and as little as seven minutes. Selects into MySQL using now() reflect the correct time. How can this be corrected?
date('Y-m-d H:i:s')Is the date ahead, or behind the actual time? Have you set the Timezone for PHP in the php.ini file? Newer versions of PHP require this step. Are you using caching on your server of any kind? Can you provide a link to the script, so we can test and replicate the problem? If you have any further questions, feel free to post them below. Thank you, John-Paul