开发者

Getting timezone value in mysql

开发者 https://www.devze.com 2023-02-08 03:56 出处:网络
How can i get current timezone开发者_如何学JAVA in mysql .May be i\'m don\'t undestand question but...

How can i get current timezone开发者_如何学JAVA in mysql .


May be i'm don't undestand question but... http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html


It's the first (and only) column of the first (and only) row of the result of this SELECT query:

SELECT @@global.time_zone;

If you want the session time zone you can use:

SELECT @@session.time_zone;

The result is like this:

mysql> SELECT @@global.time_zone;
+--------------------+
| @@global.time_zone |
+--------------------+
| Europe/Paris       |
+--------------------+
1 row in set (0.00 sec)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号