ASRock H97 Pro4にXeon E3-1265L v3を載せたHaswell。
先月Ubuntu 20.04 Serverに入替えたのだが、時間がずれている?事に気づいたらタイムゾーンがJSTになっていなかった。
GUIならばいざしらず、CUIだとどうすんだ?というわけで、ググるとtimedatectlだとあっさりわかり、万事解決。
root@haswell:~# ll
total 44
drwx------ 4 root root 4096 Oct 1 07:59 ./
drwxr-xr-x 20 root root 4096 Sep 24 02:08 ../
-rw------- 1 root root 630 Sep 24 06:48 .bash_history
-rw-r--r-- 1 root root 3106 Dec 5 2019 .bashrc
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
drwxr-xr-x 3 root root 4096 Sep 24 02:18 snap/
drwx------ 2 root root 4096 Sep 24 02:17 .ssh/
-rw------- 1 root root 13436 Oct 1 07:59 .viminfo
root@haswell:~# date
Thu 01 Oct 2020 08:20:21 AM UTC
root@haswell:~# timedatectl
Local time: Thu 2020-10-01 08:20:32 UTC
Universal time: Thu 2020-10-01 08:20:32 UTC
RTC time: Thu 2020-10-01 08:20:32
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
root@haswell:~#
root@haswell:~# timedatectl set-timezone Asia/Tokyo
root@haswell:~# timedatectl
Local time: Thu 2020-10-01 17:20:46 JST
Universal time: Thu 2020-10-01 08:20:46 UTC
RTC time: Thu 2020-10-01 08:20:46
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
root@haswell:~# date
Thu 01 Oct 2020 05:20:51 PM JST
root@haswell:~#
【参照】
●Server World https://www.server-world.info/
┣Ubuntu 20.04 LTS
┗Ubuntu 20.04 LTS : システムのタイムゾーンを設定する 2020年4月27日
●Wikipedia https://ja.wikipedia.org/wiki/
┣国際化と地域化
┣協定世界時
┗時間帯 (標準時)