Ubuntu 20.04.4 LTS の last コマンドで login 及び reboot 日時を確認してみたところ、
reboot の timestamp が明らかに 9 時間ずれている。
$ last -10
...
kou pts/0 127.0.0.1 Tue Mar 8 05:17 still logged in
reboot system boot 5.4.0-100-generi Tue Mar 8 14:17 still running
kou pts/4 127.0.0.1 Mon Mar 7 15:11 - crash (23:05)
...
明らかに JST と UTC のずれなので、「
linux last timestamp utc」とかでググってみると以下のページを見つけた。
- Linuxの環境設定に関するメモ / 2016-07-31: last rebootの実行結果が正しくない [Linux]
なんか、systemd のバグで RTC のタイムゾーンが local TZ だとこうなるらしくて、timedatectl で警告が出るそうな。
$ timedatectl
Local time: 火 2022-03-08 12:44:20 JST
Universal time: 火 2022-03-08 03:44:20 UTC
RTC time: 火 2022-03-08 12:44:20
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
つまり UTC にしとけば直るという事なんだと思うが、
の件で、RTC を UTC にすると VFAT からファイルを取り込む際に timestamp が 9 時間ずれてしまうことが明らかになっているので、その設定は容認し難い。
とりあえず、現状だと、VFAT の timestamp 正確に取る方が優先事項なので、これは放置しかないのかな?