Bug #24214 time_zone and datetime_format
Submitted: 11 Nov 2006 16:06 Modified: 15 Dec 2010 14:28
Reporter: Adolf Szabo Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:5.0.22, 5.5+ OS:Linux (Linux, Fedora5)
Assigned to: CPU Architecture:Any

[11 Nov 2006 16:06] Adolf Szabo
Description:
MySQL should store all time/date related things internally in UTC, and let change timezone any time during a session like 'SET time_zone=Europe/Budapest' without running any kind of programs first. This is because if you use mysql in a web-hosting site you don't have any ssh access or so to the server.

Think of cases like moving a web-site from the East Coast to the West Coast, mysqldump then load it on the other machine, and all of your dates are correct out of the box...

Other: Time formats. Why is it not working?

mysql> set datetime_format='%Y%m%d%H%i%s';
Query OK, 0 rows affected (0.02 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2006-11-11 16:45:03 |
+---------------------+
1 row in set (0.00 sec)

I can fix them from php/perl but mysql should support it like Oracle does.

Thanks...

How to repeat:
This is a feature request. See description.
[11 Nov 2006 17:56] Paul DuBois
datetime_format is documented as unimplemented here:

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
[15 Dec 2010 14:28] Valeriy Kravchuk
datetime_format is still listed as not implemented in http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_datetime_format. Either implement it in 5.6+ or remove from the server and from the manual.