Eu tenho o redhat linux
# more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
Eu quero alterar o hwclock para hora UTC
Então eu faço um pequeno teste como
# date -u
Tue Jul 26 10:01:53 UTC 2016
more /etc/sysconfig/clock
ZONE="Asia/Tokyo"
hwclock --show
Tue Jul 26 19:02:17 2016 -0.768566 seconds
E agora vou definir o hwclock para UTC
hwclock --systohc --utc
Mas o hwclock não muda para o tempo UTC ?
# hwclock --show
Tue Jul 26 19:02:56 2016 -0.534987 seconds
Eu também mudo o / etc / sysconfig / clock e anexe a linha UTC = yes
# vi /etc/sysconfig/clock
# more /etc/sysconfig/clock
ZONE="Asia/Tokyo"
UTC=yes
Mas, de hwclock - show , obtenho UTC tempo
# hwclock --show
Tue Jul 26 19:06:56 2016 -0.786752 seconds
Eu tento novamente pelo seguinte comando, mas sem sucesso
# hwclock --systohc --utc
# hwclock --show
Tue Jul 26 19:07:07 2016 -0.399765 seconds
Eu reinicializo a máquina para ver se obtenho UTC hwclock após a reinicialização, mas sem sucesso
# reboot
Broadcast message from root (pts/0) (Tue Jul 26 19:07:13 2016):
The system is going down for reboot NOW!
Após a reinicialização da máquina, executo o seguinte, mas ainda não consigo configurar o hwclock para UTC -: (
# hwclock --show
Tue Jul 26 19:11:05 2016 -0.697674 seconds
# hwclock --systohc --utc
# hwclock --show
Tue Jul 26 19:11:15 2016 -0.838524 seconds
Por favor, informe por que não recebo o tempo UTC pelo comando hwclock
Informações da máquina HW
# dmidecode | grep -i hp
Vendor: HP
Manufacturer: HP
Manufacturer: HP
HP ProLiant System/Rack Locator
HP BIOS PXE NIC PCI and MAC Information
HP BIOS iSCSI NIC PCI and MAC Information
Eu corro o hwclock com o debug como:
hwclock --systohc --utc --debug
hwclock from util-linux-2.13-pre7
Using /dev/rtc interface to clock.
Last drift adjustment done at 1469527871 seconds after 1969
Last calibration done at 1469527871 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change
...got clock tick
Time read from Hardware Clock: 2016/07/26 11:17:36
Hw clock time : 2016/07/26 11:17:36 = 1469531856 seconds since 1969
Time elapsed since reference time has been 0.993984 seconds.
Delaying further to reach the next full second.
Setting Hardware Clock to 11:17:36 = 1469531856 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Not adjusting drift factor because it has been less than a day since the last calibration.