Bug #42737 | Inserting a valid datetime into a timestamp column causes warning | ||
---|---|---|---|
Submitted: | 10 Feb 2009 19:04 | Modified: | 10 Feb 2009 21:07 |
Reporter: | Boris Ioffe | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.67, 5.1.30 | OS: | Linux (RHEL 5 and FreeBSD) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Inserting a valid datetime into a timestamp column causes warning |
[10 Feb 2009 19:04]
Boris Ioffe
[10 Feb 2009 19:10]
Sveta Smirnova
Thank you for the report. Please provide output of show variables like '%time_zone%';
[10 Feb 2009 19:23]
Boris Ioffe
mysql> show variables like '%time_zone%'; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | EST | | time_zone | SYSTEM | +------------------+--------+ 2 rows in set (0.06 sec)
[10 Feb 2009 19:35]
Boris Ioffe
and redhat machine is show variables like '%time_zone%'; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | CST | | time_zone | SYSTEM | +------------------+--------+ 2 rows in set (0.00 sec)
[10 Feb 2009 20:06]
Boris Ioffe
WORKAROUND: SET SESSION time_zone=UTC; // fixes the behavior, but doesn't explain why it corrupts the data in any other TZ.
[10 Feb 2009 21:07]
Sveta Smirnova
Thank you for the feedback. Both CST and EST time zones are affected by daylight saving time. See http://www.timeanddate.com/time/aboutdst.html for details. So date "2009-03-08 01:29:45" simple does not exists and converted to nearest valid date "2009-03-08 03:00:00"