MySql Time Zones

mysql time zone variables
mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | SYSTEM              | 
+--------------------+---------------------+
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2009-03-30 11:12:12 | 
+---------------------+

change mysql time zone variable
mysql> set time_zone = 'MET';
mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | MET                 | 
+--------------------+---------------------+
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2009-03-30 13:12:12 | 
+---------------------+

If you update timezone infor on your server you may need to sync it to mysql with MySqlTimeToSql

REFERRERS
MySql
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki