2024年11月24日星期日 下午5:01:21

Debian 11 time synchronization

1 年 前
#20072 引用
Debian 11  time synchronization

如何在Debian 10上设置时间同步

https://blog.csdn.net/cukw6666/article/details/107984698



Debian 10 has time synchronization built in and activated by default using the standard ntpd time server, provided by the ntp package

0
1 年 前
#20073 引用
列出可用的时区:

timedatectl list-timezones


Asia/Seoul
Asia/Shanghai
Asia/Singapore

0
1 年 前
#20074 引用
sudo timedatectl设置时区美国/纽约

sudo timedatectl set-timezone America/New_York





root@raspberrypi:/var/log# timedatectl
               Local time: 六 2023-01-21 08:17:48 CST
           Universal time: 六 2023-01-21 00:17:48 UTC
                 RTC time: n/a
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
0
1 年 前
#20075 引用
date

root@raspberrypi:/var/log# date
2023年 01月 21日 星期六 08:14:37 CST

0
1 年 前
#20076 引用
sudo systemctl status systemd-timesyncd

sudo systemctl status systemd-timesyncd


root@raspberrypi:/var/log# sudo systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-01-13 00:00:10 CST; 1 weeks 1 days ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 314 (systemd-timesyn)
     Status: "Initial synchronization to time server 162.159.200.1:123 (2.debian.pool.ntp.org)."
      Tasks: 2 (limit: 2200)
     Memory: 1.1M
        CPU: 3.287s
     CGroup: /system.slice/systemd-timesyncd.service
             └─314 /lib/systemd/systemd-timesyncd
0