我正在通过 tzselect 更改时区,但注销时该时区更改为默认时区。如何永久地进行此更改?
服务器时区也应该反射(reflect) mysql 时区。如何做到这一点?
最佳答案
I am changing the time zone by tzselect but on logout this time zone changes to default one. How to make this change permanently ?
请按照以下步骤操作:
$ date
Fri Dec 20 09:42:24 UTC 2013
$ rm -rf /etc/localtime
$ ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime
$ date
Fri Dec 20 01:43:19 PST 2013
重点是,您需要使用位于/usr/share/zoneinfo/下的所需zoneinfo文件
Server time zone should also reflect on the mysql time zone. How to do this ?
我无法正确解释上述陈述。但似乎您应该使用 NTP,以便所有服务器的时间都是相同的。
关于java - Linux服务器如何永久更改时区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20700509/