久しぶりにブログ書くな。
masasuzu.hatenablog.jp
上記記事、これあんまりよくなくて、Ubuntu的にはこう変えるのが良い。
UbuntuTime - Community Help Wiki
echo "Asia/Tokyo" > /etc/timezone
dpkg-reconfigure --frontend noninteractive tzdata
ただ、Ubuntu 16.04だとこれうまく変わってくれないので timedatectl
を使ってあげる必要がある。
timedatectl set-timezone Asia/Tokyo
こんな感じですね。
root@lab:~# timedatectl status
Local time: Thu 2017-02-09 14:42:40 JST
Universal time: Thu 2017-02-09 05:42:40 UTC
RTC time: Thu 2017-02-09 05:42:40
Time zone: Asia/Tokyo (JST, +0900)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
root@lab:~# timedatectl set-timezone Australia/Adelaide
root@lab:~# timedatectl status
Local time: Thu 2017-02-09 16:12:44 ACDT
Universal time: Thu 2017-02-09 05:42:44 UTC
RTC time: Thu 2017-02-09 05:42:44
Time zone: Australia/Adelaide (ACDT, +1030)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
root@lab:~# timedatectl set-timezone Asia/Tokyo
root@lab:~# timedatectl status
Local time: Thu 2017-02-09 14:42:54 JST
Universal time: Thu 2017-02-09 05:42:54 UTC
RTC time: Thu 2017-02-09 05:42:54
Time zone: Asia/Tokyo (JST, +0900)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no