How do I set the time zone of MySQL?

后端 未结 20 3278
闹比i
闹比i 2020-11-21 07:07

On one server, when I run:

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2009-05-30 16:54:29 |
+---------         


        
20条回答
  •  旧巷少年郎
    2020-11-21 07:27

    This work for me for a location in India:

    SET GLOBAL time_zone = "Asia/Calcutta";
    SET time_zone = "+05:30";
    SET @@session.time_zone = "+05:30";
    

提交回复
热议问题