How to set MySQL to use GMT in Windows and Linux

前端 未结 6 1507
春和景丽
春和景丽 2020-12-29 04:58

I\'m just trying to get MySQL to store time in GMT...

I\'ve read the documentation here: http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html

It say

6条回答
  •  -上瘾入骨i
    2020-12-29 05:18

    Just to save a few clicks, the list of zone names is shown like this:

    select name from mysql.time_zone_name;
    

    Beware of setting a fixed-offset zone such as 'GMT' or '+00:00' since it will not alter to match local time / DST etc. If you want it to follow local time, set the zone to 'Europe/London' instead. If you don't want that I'd go for UTC over GMT anyway.

提交回复
热议问题