最終更新:2024-11-19 (火) 13:46:01 (122d)
hwclock
Top / hwclock
Time clocks utility.
デュアルブートで時計がずれるとき
- Ubuntu 20.04
sudo hwclock --verbose --systohc --localtime
- Ubuntu 18.04
sudo hwclock -D --systohc --localtime
set the RTC from the system time
hwclock --systohc
- ローカル時間にする
hwclock -D --systohc --localtime
- ローカル時間にする
- UTCにする
sudo hwclock -D --systohc --utc
--systohc
- set the SYStem time TO the Hardware Clockの略
- システム時刻を、ローカル時としてハードウェアクロックにセットしなさいと指示
メモ
-D : use --verbose
help
Usage: hwclock [function] [option...] Time clocks utility. Functions: -r, --show display the RTC time --get display drift corrected RTC time --set set the RTC according to --date -s, --hctosys set the system time from the RTC -w, --systohc set the RTC from the system time --systz send timescale configurations to the kernel -a, --adjust adjust the RTC to account for systematic drift --predict predict the drifted RTC time according to --date Options: -u, --utc the RTC timescale is UTC -l, --localtime the RTC timescale is Local -f, --rtc <file> use an alternate file to /dev/rtc0 --directisa use the ISA bus instead of /dev/rtc0 access --date <time> date/time input for --set and --predict --delay <sec> delay used when set new RTC time --update-drift update the RTC drift factor --noadjfile do not use /etc/adjtime --adjfile <file> use an alternate file to /etc/adjtime --test dry run; implies --verbose -v, --verbose display more details -h, --help display this help -V, --version display version For more details see hwclock(8).