旧いシステムを仮想化して復旧したら時間がずれる。
hwclock を localtime として認識させればいいのだが、旧いシステムなので設定をどうやっていたのかな?
環境
$ cat /etc/issue
Scientific Linux release 6.10 (Carbon)
centOS 6.1 と互換。
状況
$ date
2023年 10月 30日 月曜日 06:03:56 JST
$ strings /etc/localtime
TZif2
TZif2
UTC0
$ cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Tokyo"
$
設定
「【Linux】タイムゾーン(Timezone)の変更」
https://qiita.com/azusanakano/items/b39bd22504313884a7c3
の通り作業を行いました。
# cd /etc
# cp localtime localtime.org
# ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
# vim /etc/sysconfig/clock
として
内容を以下のように変更しています。
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Tokyo"
UTC=false