Jelastic - How to change server date and time to UTC?

左心房为你撑大大i 提交于 2019-12-08 09:07:14

问题


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?


回答1:


In general you are expected to manipulate the timezone at application level, not server level (e.g. set the timezone to your needs in php.ini).

If you need the timezone to be changed at server level (e.g. to make cron more understandable), you can contact your hosting provider's support team for this.

The clock itself should already be correctly synchronised with NTP at platform level, so this should only ever be about switching between timezones...




回答2:


This command should work for VPS and Docker containers by default

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

For other container templates ask your cloud hosting provider to give you root access.



来源:https://stackoverflow.com/questions/29079052/jelastic-how-to-change-server-date-and-time-to-utc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!