Does the "incorrect" time match the output of "date -u"? If so, it's probably storing times in UTC and displaying your local time zone to you. This is probably actually the "correct" behavior (as MySQL DATETIME columns do not have a timezone attribute IIRC), but it does need to be handled by your application or framework.
(Typically, the best approach to handling time is to store it in UTC, and convert to/from local time as close to the human as possible.)
_________________
Code:
/* TODO: need to add signature to posts */