How do I set the time zone of MySQL?

后端 未结 20 3327
闹比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:26

    For anyone still having this issue:

    value="jdbc:mysql://localhost:3306/dbname?serverTimezone=UTC"
    

    Worked for me. Just append ?serverTimezone=UTC at the end.

提交回复
热议问题