Bug #34584 | NOW() function returns time + 2 hours | ||
---|---|---|---|
Submitted: | 15 Feb 2008 10:36 | Modified: | 15 Feb 2008 15:29 |
Reporter: | Sven Sandberg | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: General | Severity: | S2 (Serious) |
Version: | 5.1 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | date, NOW, time, timezone |
[15 Feb 2008 10:36]
Sven Sandberg
[15 Feb 2008 12:18]
Susanne Ebrecht
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. My tests: uname -a Linux ernie 2.6.22-14-generic #1 SMP Thu Jan 31 23:33:13 UTC 2008 x86_64 GNU/Linux Ubuntu 7.10 mysql> select version()\G *************************** 1. row *************************** version(): 5.1.24-rc-debug mysql> select now(), current_time(), curtime(), localtime(), sysdate(), utc_time()\G *************************** 1. row *************************** now(): 2008-02-15 13:18:14 current_time(): 13:18:14 curtime(): 13:18:14 localtime(): 2008-02-15 13:18:14 sysdate(): 2008-02-15 13:18:14 utc_time(): 12:18:14 $ date Fr 15. Feb 13:18:16 CET 2008
[15 Feb 2008 13:13]
Sven Sandberg
I took a new clone of mysql-5.0 after I saw your comment above, and the error is still there: mysql> select now(), current_time(), curtime(), localtime(), sysdate(), utc_time()\G *************************** 1. row *************************** now(): 2008-02-15 16:13:55 current_time(): 16:13:55 curtime(): 16:13:55 localtime(): 2008-02-15 16:13:55 sysdate(): 2008-02-15 16:13:55 utc_time(): 13:13:55 1 row in set (0.00 sec) $ date Fri Feb 15 13:14:07 UTC 2008
[15 Feb 2008 13:28]
Sven Sandberg
(Note: it showed UTC timezone in my last test because I had renamed /etc/localtime while debugging this.)
[15 Feb 2008 13:31]
Sven Sandberg
Adding this information: select version()\G *************************** 1. row *************************** version(): 5.1.24-rc-debug-log
[15 Feb 2008 15:29]
Sven Sandberg
Sorry, this is a feature of mysql-test-run, not a bug. It sets the timezone hard-coded to Moscow time to avoid having tests depending on the timezone.