gpt4 book ai didi

mysql - 配置mySQL继承操作系统的时区

转载 作者:行者123 更新时间:2023-11-29 16:08:55 25 4
gpt4 key购买 nike

我们的本地时钟刚刚调快了夏令时,和往常一样,我们的数据库服务器又关闭了一个小时。是否可以将 my.cnf 配置为简单地从 Cent OS 继承时区偏移,或者我们注定必须每六个月手动更改一次?

最佳答案

由于某种原因,我的答案被转换为评论,因为它很短。

您的数据库很可能设置为与服务器相同的时区。问题如下:

Neither the DATETIME nor the TIMESTAMP field types can accurately store data in a timezone that observes DST. If you store "2009-11-01 01:30:00" the fields have no way to distinguish which version of 1:30am you wanted -- the -04:00 or -05:00 version.

有关详细答案,请查看此处:https://stackoverflow.com/a/1650910/11291413

关于mysql - 配置mySQL继承操作系统的时区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55457331/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com