You are not logged in.

#1 2018-01-10 09:25:38

nanxiao
Member
Registered: 2017-07-27
Posts: 21

[Solved]The question about synchronize RTC and local time

My server's RTC time is correct but local&universal time slow. So I use "hwclock --hctosys" to synchronize them. But after a while:   

$ timedatectl
                      Local time: Wed 2018-01-10 17:12:39 +08
                  Universal time: Wed 2018-01-10 09:12:39 UTC
                        RTC time: Wed 2018-01-10 09:12:47
                       Time zone: Asia/Singapore (+08, +0800)
       System clock synchronized: yes
systemd-timesyncd.service active: no
                 RTC in local TZ: no

We can see the local&universal time is slow again. 

What is the correct method to synchronize RTC and local time? Thanks very much in advance!

Best Regards
Nan Xiao

Last edited by nanxiao (2019-04-16 02:40:14)

Offline

#2 2018-01-10 09:40:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved]The question about synchronize RTC and local time

Properly setting the RTC to either UTC or localtime should fix this: https://wiki.archlinux.org/index.php/Time#Time_standard

On second thought, apparently I can't read:

A certain amount of drift is to be expected https://wiki.archlinux.org/index.php/Time#Time_skew maybe setting up proper synchronization will help?

Last edited by V1del (2018-01-10 09:48:56)

Offline

#3 2018-01-10 09:45:04

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved]The question about synchronize RTC and local time

Easiest thing to do is just set up NTP synchronization. It's a good thing anyway, and will correct this drift.

V1del is assuming a different problem.

Online

#4 2018-01-11 13:48:58

nanxiao
Member
Registered: 2017-07-27
Posts: 21

Re: [Solved]The question about synchronize RTC and local time

"systemctl start systemd-timesyncd" Fix my problem, thx!

Offline

#5 2018-01-11 14:55:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved]The question about synchronize RTC and local time

Please mark as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB