1

Due to some reasons, I have to remotely set hardware clock time in UTC and system time in local time. My OS is OpenSUSE 13.1 and my tool is only the hwclock command. What I do so far:

1. Synchronize time use ntpdate command-> system time is correctly displayed in local time with time zone Indochina (GMT+7)

date
Tue Aug 30 14:00:00 ICT 2016

2. Set hardware clock to UTC

hwclock --systohc --utc

3. Reboot, check BIOS Time. Hardware clock is already in UTC Time, ie 7:00 AM.

4. Log in to machine. System time is incorrect.

 date
 Tue Aug 30 07:00:00 ICT 2016
 date -u
 Tue Aug 30 00:00:00 UTC 2016

5. Correct time using hwclock (Note: --localtime instead of --utc here doesn't work)

hwclock --hctosys --utc
date
Tue Aug 30 14:00:00 ICT 2016
date -u
Tue Aug 30 07:00:00 UTC 2016

6. Reboot, system time is incorrect again. Repeat step 5 to correct it.

This is driving me crazy since I don't know what is wrong. Please help, I don't want to correct the system time every time the machine boot!

PS: Content of /etc/adjtime

0.000000 1472543544 0.000000
1472543544
UTC
  • What does /etc/adjtime contain? – Stephen Kitt Aug 30 '16 at 8:13
  • @StephenKitt I've updated my question with /ect/adjtime content – Anh Tuan Aug 30 '16 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.