显示准确的时区

显示准确的时区
$ date
Tue 25 May 2021 12:31:56 PM CST
$ systemctl list-timers
NEXT                        LEFT          LAST                        PASSED        UNIT                         ACTIVATES
Tue 2021-05-25 16:39:00 CST 6min left     Tue 2021-05-25 16:09:05 CST 23min ago     phpsessionclean.timer        phpsessionclean.service
Tue 2021-05-25 18:12:30 CST 1h 40min left Tue 2021-05-25 11:39:43 CST 4h 52min ago  fwupd-refresh.timer          fwupd-refresh.service
Wed 2021-05-26 00:00:00 CST 7h left       Tue 2021-05-25 00:00:09 CST 16h ago       logrotate.timer              logrotate.service
Wed 2021-05-26 00:00:00 CST 7h left       Tue 2021-05-25 00:00:09 CST 16h ago       man-db.timer                 man-db.service

目前尚不清楚 CST 指的是古巴时区、喀麦隆时区还是美国中部时区。

我的 Linux 是否可以拼出时区的全名或使用 UTC-x 格式?

答案1

使用timedatectl

sh@balrog:~$ timedatectl 
                      Local time: Tue 2021-05-25 12:41:55 CEST
                  Universal time: Tue 2021-05-25 10:41:55 UTC
                        RTC time: Tue 2021-05-25 10:41:55
                       Time zone: Europe/Berlin (CEST, +0200)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

相关内容