| Bug #1766 | Incorrect values returned from UNIX_TIMESTAMP() | ||
|---|---|---|---|
| Submitted: | 6 Nov 2003 7:38 | Modified: | 13 Dec 2003 11:43 |
| Reporter: | [ name withheld ] | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 4.0.13-log | OS: | Linux (Debian Linux Kernel 2.4.20) |
| Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[11 Nov 2003 23:47]
Ramil Kalimullin
what's your server timezone variable value?
[13 Dec 2003 11:43]
Michael Widenius
As Ramil pointed out; The value of unix_timestamp() depends on the value of the timezone variable. You can check this with: show variables like "%timezone%"; For more information, please consult the MySQL manual. Regards, Monty

Description: I've noticed that mysql sometimes returns UNIX_TIMESTAMP()s incorrectly. Case in point. When doing the following: SELECT UNIX_TIMESTAMP('2003-10-12 09:00:00'), I get the value 1065963600. This value should be 1065967200. I don't know that I've found any other situations where this value is incorrectly returned. How to repeat: SELECT UNIX_TIMESTAMP('2003-10-12 09:00:00');