0

I'm trying to change my Jelastic server environment clock to UTC.

I tried:

hwclock --systohc

But my server (CentOS) somehow does not recognize the command hwclock. Perhaps they removed it, I don't know. I tried searching their docs but did not find how to change the server clock.

Any ideas?

4

2 回答 2

2

一般来说,您应该在应用程序级别而不是服务器级别操作时区(例如,在 php.ini 中根据您的需要设置时区)。

如果您需要在服务器级别更改时区(例如,使 cron 更易于理解),您可以联系您的托管服务提供商的支持团队。

时钟本身应该已经在平台级别与 NTP 正确同步,所以这应该只是关于时区之间的切换......

于 2015-03-16T15:41:59.260 回答
1

此命令默认适用于 VPS 和 Docker 容器

ln -sf /usr/share/zoneinfo/Europe/Gibraltar /etc/localtime

对于其他容器模板,请让您的云托管服务提供商为您提供 root 访问权限。

于 2016-05-12T12:45:02.350 回答