$ hexo generate INFO Start processing INFO Files loaded in 614 ms INFO Generated: post-sitemap.xml INFO Generated: sitemap.xml INFO Generated: tag-sitemap.xml INFO Generated: index.html INFO 5 files generated in 1.14 s
$ timedatectl Local time: 金 2019-11-15 16:28:34 UTC Universal time: 木 2019-11-14 16:28:34 UTC RTC time: 木 2019-11-14 16:28:34 Time zone: UTC (UTC, +0000) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: no
ここで確認したいのは
タイムゾーン
RTCへLocal Timeを同期するか
です。
タイムゾーンはUTC、RTCへLocal Timeを同期しない設定となっています。
そのため、次にWindowsを起動した際にはRTCの時刻がズレた状態となります。
タイムゾーンをJSTにする
JSTとは日本時間の事です。
次のコマンドでタイムゾーンを日本時間に変更します。
1
$ timedatectl set-timezone Asia/Tokyo
念の為、設定が変わった事を確認します。
1 2 3 4 5 6 7 8
$ timedatectl Local time: 金 2019-11-15 01:35:59 JST Universal time: 木 2019-11-14 16:35:59 UTC RTC time: 木 2019-11-14 16:35:59 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: no
RTCに同期する時刻をLocal Timeにする
次のコマンドでRTCにLocal timeを同期させる設定を行います。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ timedatectl set-local-rtc true Local time: 金 2019-11-15 01:38:59 JST Universal time: 木 2019-11-14 16:38:59 UTC RTC time: 金 2019-11-15 01:38:59 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: yes
Warning: The system is configured to read the RTC time in the local time zone. This mode can not 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'.