Skip to content

How to set system time manually without stopping chrony #16455

Answered by martinpitt
jimbiggins asked this question in Q&A
Discussion options

You must be logged in to vote

I don't understand why setting the time manually via timedatectl should ever fail.

That's actually by design in timedated/timesyncd. Usually you have to make up your mind whether you want the admin or NTP to set the time, otherwise it's not well-defined what should actually happen.

I just tested this in CentOS 8, which has no timesyncd, and only chronyd (enabled by default):

    Local time: Fri 2021-10-15 16:15:47 UTC
           Universal time: Fri 2021-10-15 16:15:47 UTC
                 RTC time: Fri 2021-10-15 16:15:47
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

# timedatectl set-time '…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jimbiggins
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by martinpitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants