295138
禅道服务器时间比北京时间晚10分钟
回帖数 1
阅读数 1001
发表时间 2024-10-16 09:36:17
在北京时间9点28提的bug,提交成功后,查看bug的创建日期,时间是9点18
1个回复
以下是几种方法可以让 Linux 服务器的时间保持准确:
一、使用网络时间协议(NTP)
安装 NTP 服务:
在 Ubuntu 和 Debian 系统上:
sudo apt-get install ntp在 CentOS 和 Red Hat 系统上:
sudo yum install ntp
配置 NTP:
编辑 NTP 配置文件,通常是
/etc/ntp.conf。可以根据需要添加或修改 NTP 服务器地址。例如:
server ntp.ubuntu.com
server time.windows.com启动 NTP 服务并设置为开机自启动:
Ubuntu 和 Debian:
sudo systemctl start ntp && sudo systemctl enable ntpCentOS 和 Red Hat:
sudo systemctl start ntpd && sudo systemctl enable ntpd
二、手动设置时间
使用
date命令设置时间:例如,设置时间为 2024 年 10 月 16 日 15:30:00,可以使用以下命令:
sudo date -s "20241016 15:30:00"
同步硬件时钟:
将系统时间同步到硬件时钟:
sudo hwclock --systohc将硬件时钟同步到系统时间:
sudo hwclock --hctosys
2024-10-16 09:45:09 孔令茂 最后编辑 2024-10-16 09:45:09 孔令茂 回帖
联系我们
联系人
金娟/高级客户经理
电话(微信)
18562856230
QQ号码
1826606239
联系邮箱
jinjuan@chandao.com

相关帖子
柳先森 | 最后回帖 2018-08-31 08:49 柳先森
wh | 最后回帖 2023-06-25 09:12 金凯
laughing wen | 最后回帖 2023-09-26 14:45 禅道 - 闫敏
萬水千山 | 最后回帖 2018-12-27 16:02 张启峰
田小宁 | 最后回帖 2018-08-03 18:18 石洋洋
黄雨 | 最后回帖 2019-06-27 08:51 禅道 - 闫敏
孔令茂


精品资料包
1V1产品演示
免费试用增强功能
专属顾问答疑支持


