今朝、次のコマンドを実行しました。
root@xxx:01:21:17:/home/xxx$ date --set "2015-08-06 02:54"
Thu Aug 6 02:54:00 WIB 2015
root@xxx:02:54:00:/home/xxx$ hwclock --set --date="2015-08-06 02:54"
その日遅く時計を確認してみると予定されていましたが遅延が08:00
表示されました10 minutes
。
root@xxx:07:49:59:/home/xxx$ date
Thu Aug 6 07:50:00 WIB 2015
root@xxx:07:50:00:/home/xxx$ hwclock
Thu Aug 6 07:50:01 2015 .392298 seconds
その理由は何ですか? VirtualBoxで64ビットArchLinuxを使用しています。
$ uname -a
Linux xxx 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015 x86_64 GNU/Linux
タイムゾーンはGMT+7です。
$ date +'%:z %Z'
+07:00 WIB
$ strings /etc/localtime | tail -n 1
WIB-7
コメントで提案されているとおりにインストールすると、ntp
問題は一時的に解決されました。
sudo pacman -S ntp
sudo systemctl enable ntpd
sudo systemctl start ntpd
timedatectl set-ntp true
timedatectl
しかしある日、時間は再び流れ始めた。
Local time: Fri 2015-08-07 23:52:10 WIB --> 30 minutes late
Universal time: Fri 2015-08-07 16:52:10 UTC
RTC time: Fri 2015-08-07 16:52:10
Time zone: Asia/Jakarta (WIB, +0700)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no