HWCLOCK(8) hwclock - hwclock [] [...] hwclock . : ; ; ; ; ; ; , ( ); . 2.26 --hctosys --directisa, --update-drift. . , . , --show. -a, --adjust . , . --getepoch; --setepoch , RTC . . - . , 1952. , 1952. --setepoch --epoch . : hwclock --setepoch --epoch=1952 RTC , . hwclock . ISA 1900. --param-get=; --param-set== RTC . , , RTC RTC-. RTC ( include/uapi/linux/rtc.h ) . --help . , 0x, , . --param-index number Select an instance of the same RTC parameter with it's index number. The default value for number is 0. --predict --date /etc/adjtime. , , ( ). rtcwake(8). hwclock , ,, 11 " . -r, --show; --get ISO 8601 . , -. --localtime. . --get , /etc/adjtime. hwclock , ,,11- " -. -s, --hctosys . . , . . , . --hctosys /etc/adjtime --localtime --utc. : . , LOCAL UTC. , --hctosys . TZ /etc/localtime, tzset(3) . tz_dsttime . ( , settimeofday(2).) , --hctosys settimeofday-(2) , NTP ,,11- " ___. . , . /. . , . , , NTP ,,11- ", --hctosys . /etc/adjtime . --update-drift --systohc ( ). --noadjfile --hctosys. /etc/adjtime. Hwclock . , . hwclock --localtime --adjust; , naredba , . hwclock- . , , , . hwclock- . --set --date, /etc/adjtime. --update-drift () . --set . --update-drift . --systz --hctosys ; . 2.6 . --hctosys: o . , hwclock . o NTP ,,11 " . o . settimeofday-(2) . . . -w, --systohc , /etc/adjtime. --update-drift () . --systohc . --update-drift . --vl-read, --vl-clear RTC . --vl-read . --vl-clear , RTC . include/uapi/linux/rtc.h . RTC , . -h, --help . -V, --version . --adjfile=- /etc/adjtime. --date=_ --set --predict, . hwclock --set --date='16:45' hwclock --predict --date='2525-08-14 07:11:05' , -. --localtime. , . ,,+5 ", hwclock- . . , . --delay= This option overrides the default delay used when setting the clock time. The default is 0.5 (500 ms) for rtc_cmos; for other RTC types the delay is 0. If the RTC type cannot be determined (from sysfs), then the delay defaults also to 0.5 to be backwardly compatible. The 500 ms default is based on the commonly used MC146818A-compatible (x86) hardware clock. This Hardware Clock can only be set to an integer time plus one half second. The integer time is required because there is no interface to get or set a fractional second. The additional half second is because the Hardware Clock updates to the following second precisely 500 ms after setting the new time. Unfortunately, this behavior is hardware specific and in some cases a different delay is required. -D, --debug --verbose. --debug . --directisa ISA x86 x86_64 . , . hwclock- / . , hwclock ,,rtc" , RTC . 2.26 ,,rtc" ; . , , . --rtc. --epoch= --setepoch. 1900. (ULONG_MAX - 1). -f, --rtc=- Override hwclock's default rtc device file name. Otherwise it will use the first one found in this order: /dev/rtc, /dev/rtc0, /dev/misc/rtc. For IA-64: /dev/efirtc /dev/misc/efirtc -l, --localtime; -u, --utc . , . --localtime --utc hwclock. ( ), . --utc --localtime (--set, --systohc, --adjust), /etc/adjtime. ,,adjtime" , . : . , . --noadjfile /etc/adjtime. hwclock . --utc --localtime . --test , , /etc/adjtime (--verbose ). --update-drift /etc/adjtime. --set --systohc. . . , . v2.26, hwclock --systohc ; () : o NTP- ,,11 " . o ,," . ,," . , . o () . , , . o ( 2.31 --update-drift ,,RTC" ). Having hwclock calculate the drift factor is a good starting point, but for optimal results it will likely need to be adjusted by directly editing the /etc/adjtime file. For most configurations once a machine's optimal drift factor is crafted it should not need to be changed. Therefore, the old behavior to automatically (re)calculate drift was changed and now requires this option to be used. See the discussion below, under The Adjust Function. This option requires reading the Hardware Clock before setting it. If it cannot be read, then this option will cause the set functions to fail. This can happen, for example, if the Hardware Clock is corrupted by a power failure. In that case, the clock must first be set without this option. Despite it not working, the resulting drift correction factor would be invalid anyway. -v, --verbose hwclock . - : : , (, , .), . ISA , ISA . , 1 , . , , RTC, BIOS CMOS . , , hwclock-. . -ISA . I2C SPI . : . ( ISA , ISA .) . 00:00:00 1. 1970. - ( , 1969. ). . . . . -, ISA , . date(1) . , , , . : hwclock --systohc . hwclock. - . , ( ) : /etc/localtime, tzset(3). , , , . ,,vfat" . , ,,vfat" . NTP ,,11- " . / ___ , ,, 11 ". , . hwclock TZ /etc/localtime --hctosys --systz. : 1) ,,tz_minuteswest" ( DST) -, 2) ,,tz_dsttime" (DST) . . * settimeofday*(2). hwclock . / ,,rtc" , ,,rtc" . , ,,rtc" ,,udev"-, . ,,rtc" --rtc. , ,,rtc" . , . ISA , hwclock ,,CMOS " , / 0x70 0x71. / - . --directisa. , / . hwclock , ISA ,,rtc" . . , - . . --adjust hwclock . : hwclock , /etc/adjtime, . ,,adjtime". ,,adjtime". hwclock --set . hwclock ,,adjtime" . , 10 , hwclock --set --update-drift 10 . hwclock ,,adjtime" 2 . 24 , hwclock --adjust. hwclock ,,adjtime" 2 . , 2 . . 24 hwclock --adjust. hwclock : 2 ,,adjtime" . --update-drift --set --systohc, () , 24- ,,adjtime". /etc/adjtime. , --adjust 1 . , , 1 --adjust . hwclock --hctosys ,,adjtime" . 1 --adjust . ,,adjtime" . --adjust, . ,,Adjtime" , hwclock . ,,adjtime" , -: 1 : , : 1) , ; 2) 1969. , ; 3) ( clock(8)) . 2 : : 1969. . ( , ). . 3 : ,," ,,". . hwclock- . ,,adjtime" clock(8) hwclock. . 11 . , . NTP . (NTP . RFC 1305.) ,, 11 ", . , 6 ( 0x0040) _ . ,,status" adjtimex --print ntptime. , NTP ,,11- ". , hwclock --hctosys. , NTP , ,,11- " . ,,11- ", --hctosys --systz , . , . . . ___. --hctosys --systz , ,,adjtime" . , . hwclock --adjust NTP ,,11 ". ISA 50 CMOS ISA . hwclock , , . CMOS , hwclock-; . ,,direct ISA" . ,,ACPI" , . - : o -, NTP . o . , POSIX vs 'RIGHT'. o , : adjtimex --tick --frequency hwclock --hctosys o : hwclock --systohc o adjtimex ntptime. NTP , . . ,," . . , . . , . . , hwclock- ( ) , . --tick --frequency adjtimex(8). : , . ( adjtimex, ntptime -f ppm.) adjtimex-. . , . , . --log adjtimex-. sntp, date -Ins , . , . adjtimex(2) . , . , . 24/7 . . , . : 1 NTP . 2 ! 3 . 4 . 5 . 6 hwclock , --update-drift . : 6 --systohc, ( 6a) . hwclock , /etc/adjtime. . , , sntp date -Ins , . vs : o , . o , . ISA , . , hwclock- , ,," . . hwclock --date. , , . , - . , , . . 7 , ,, " -. POSIX vs ,,RIGHT" , tzset-(3). ,," , ,,tz" ,,zoneinfo". ,,zoneinfo" , ,,". ,," ( ,,zoneinfo-leaps") , . ,," , ( + ), (TAI - 10). . pretvara , , ,," . : . , /usr/share/zoneinfo. ,," , . TZ='right/Europe/Dublin'. ,,zoneinfo" ,," ,,zoneinfo" : /usr/share/zoneinfo, /usr/share/zoneinfo-posix, /usr/share/zoneinfo-leaps , . , ,," . ,,zoneinfo" . ; -, hwclock ; /usr/share/zoneinfo, . , , . , . ,,zoneinfo" ,,", , TZDIR. : EXIT_SUCCESS (0 POSIX ) . EXIT_FAILURE (1 POSIX ) . TZ . TZDIR . /etc/adjtime hwclock. adjtime_config(5). /etc/localtime . /usr/share/zoneinfo/ . Device files hwclock may try for Hardware Clock access: /dev/rtc /dev/rtc0 /dev/misc/rtc /dev/efirtc /dev/misc/efirtc date(1), adjtime_config(5), adjtimex(8), gettimeofday(2), settimeofday(2), crontab(1p), tzset(3) Bryan Henderson , 1996., clock(8) Charles Hedrick, Rob Hooft, Harald Koenig. . , ,,https://github.com/util-linux/util-linux/issues[issue tracker]". hwclock ,,util-linux" . util-linux 2.42.3 2026-09-02 HWCLOCK(8)