全球主机交流论坛

标题: Debian11时间老是有问题 [打印本页]

作者: 柳泊风    时间: 2023-12-27 11:29
标题: Debian11时间老是有问题
区域已经修改为上海的,然后不管是自动同步还是自行调整时间把调整后的时间写入bios还是会慢18分钟
DD的萌咖大佬的Debian 11  这个问题怎么解决
作者: hang6    时间: 2023-12-27 11:30
装个ntp同步时间就好
作者: 柳泊风    时间: 2023-12-27 11:32
hang6 发表于 2023-12-27 11:30
装个ntp同步时间就好

没用,已经提到了自动同步也一样   换了好几个同步源都一样
作者: 埃隆马斯克    时间: 2023-12-27 11:32
为什么要改shi区
作者: 念念不忘    时间: 2023-12-27 11:33
我没遇到过
作者: sing    时间: 2023-12-27 11:38
dpkg-reconfigure tzdata

试试这个
作者: ABCFUN    时间: 2023-12-27 11:39
这个脚本试试;wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh
选1 会校准时间
作者: reancool    时间: 2023-12-27 14:27
rdate -t 60 -s stdtime.gov.hk
作者: 蒙面人    时间: 2023-12-27 14:28
宿主机在给你同步bois时间吧?
作者: nk123    时间: 2023-12-27 14:34
直接换Debian12
作者: ccf    时间: 2023-12-27 14:36
母鸡的问题吧
作者: 枝江小狼王    时间: 2023-12-27 14:36
服务器改啥时区, 又不是用户终端
作者: yanzhiling2002    时间: 2023-12-27 14:50
请chatgpt写了个脚本

  1. #!/bin/bash

  2. # 检测发行版
  3. if command -v yum &> /dev/null; then
  4.     # CentOS
  5.     TIME_SYNC_CMD="yum install -y ntp && systemctl enable ntpd && systemctl start ntpd"
  6. elif command -v apt-get &> /dev/null; then
  7.     # Debian/Ubuntu
  8.     TIME_SYNC_CMD="apt-get update && apt-get install -y ntp && systemctl enable ntp && systemctl start ntp"
  9. else
  10.     echo "Unsupported distribution. Please install and configure NTP manually."
  11.     exit 1
  12. fi

  13. # 设置时区为Asia/Shanghai
  14. timedatectl set-timezone Asia/Shanghai

  15. # 停止时间同步服务(NTP或systemd-timesyncd)
  16. if command -v systemctl &> /dev/null; then
  17.     systemctl stop ntpd
  18.     systemctl stop systemd-timesyncd
  19. else
  20.     service ntp stop
  21. fi

  22. # 使用NTP服务器同步时间
  23. ntpdate cn.pool.ntp.org

  24. # 启动时间同步服务
  25. eval $TIME_SYNC_CMD

  26. # 显示校准后的时间
  27. date
复制代码

作者: 全球IDC直营机房    时间: 2023-12-27 14:52
直接换机器




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4