timedatectl 指令可以顯示目前設定
# timedatectl
      Local time: Thu 2019-05-02 06:45:47 UTC
  Universal time: Thu 2019-05-02 06:45:47 UTC
        RTC time: Thu 2019-05-02 06:45:48
       Time zone: Etc/UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

修改timezone
# cd /etc

# ls -lh | grep localtime
lrwxrwxrwx 1 root root     27 May 24  2018 localtime -> /usr/share/zoneinfo/Etc/UTC

# rm localtime && ln -s /usr/share/zoneinfo/Asia/Taipei localtime

# ls -lh | grep localtime
lrwxrwxrwx 1 root root     31 May  2 14:48 localtime -> /usr/share/zoneinfo/Asia/Taipei

# timedatectl
      Local time: Thu 2019-05-02 14:48:21 CST
  Universal time: Thu 2019-05-02 06:48:21 UTC
        RTC time: Thu 2019-05-02 06:48:22
       Time zone: Asia/Taipei (CST, +0800)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

undefined

arrow
arrow
    文章標籤
    ubuntu timezone
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()