顯示準確的時區

顯示準確的時區
$ 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

使用時間日期控件:

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

相關內容