Page 1 of 1

time retrieved incorrectly from mysql

Posted: Mon Oct 27, 2008 5:05 pm
by jasonblack
First let me vent a second by saying that this has been maddening. Also, it has nothing to do with timezone configuration. You'll start to think that it does but I promise you, it doesn't.

Dates stored in mysql (with type date) are stored correctly. When retried via php date() , however, they are one day behind (ie., looking at raw mysql record is 10-27-2008 but as retrieved by php, it's 10-26-2008).

Dates stored in mysql (with type datetime) are stored and retrieved correctly.

This behavior is 100% consistent (at all times of day). Any ideas?

Re: time retrieved incorrectly from mysql

Posted: Mon Oct 27, 2008 7:25 pm
by VladSun
Please, post you PHP and SQL code, so we would be able (or not) to reproduce your problem.