使用 debootstrap 手动安装后,我的服务器始终使用本地时间。我已经尝试将时区设置为 UTC,但没有奏效。时区是使用以下命令设置的:
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
Run Code Online (Sandbox Code Playgroud)
我想强制服务器始终使用 UTC 作为时区。
日期
Mo 4. Jun 13:08:51 CEST 2018
Run Code Online (Sandbox Code Playgroud)
日期 -u
Mo 4. Jun 11:09:07 UTC 2018
Run Code Online (Sandbox Code Playgroud)
ls -al /etc/localtime
lrwxrwxrwx 1 root root 23 Jun 4 13:09 /etc/localtime -> /usr/share/zoneinfo/UTC
Run Code Online (Sandbox Code Playgroud)
猫 /etc/timezone
Etc/UTC
Run Code Online (Sandbox Code Playgroud)
时间控制
Local time: Di 2018-06-05 14:52:12 CEST
Universal time: Di 2018-06-05 12:52:12 UTC
RTC time: Di 2018-06-05 12:52:12
Time zone: Etc/UTC (CEST, +0200)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
Run Code Online (Sandbox Code Playgroud)
我已经尝试通过以下命令配置时区但没有效果:
dpkg-reconfigure tzdata …Run Code Online (Sandbox Code Playgroud)