标签:sha 编辑 app php 保存 服务器时间 时间 cal this
[root@localhost ~]# date -R
Fri, 07 Dec 2018 04:38:28 -0500
先使用 tzselect
根据提示选择所在地区,最终生成时区
You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
然后编辑 /etc/profile
文件,添加 TZ=‘Asia/Shanghai‘; export TZ
,编辑完成后保存,运行 source /etc/profile
再次使用 date -R
查看时间
Fri, 07 Dec 2018 17:42:28 +0800
安装 ntpdate
[root@localhost ~]# yum install ntpdate -y
前往 http://www.ntp.org.cn 查询可用的NTP服务,同步时间
[root@localhost ~]# ntpdate cn.ntp.org.cn
如同步出现错误 no server suitable for synchronization found
,可尝试使用 ntpdate -u cn.ntp.org.cn
同步
标签:sha 编辑 app php 保存 服务器时间 时间 cal this
原文地址:https://www.cnblogs.com/wenhui92/p/10084269.html