On a CentOs 7 machine, I have a service that modifies the timezone and just after that it makes a request to S3 to download some binaries. In fact, the request fails with the well known error message:
S3 Error: The difference between the request time and the current time is too large
To fix this, I have to wait for 15s in order that chronyd synchronize time. However, I do not want to wait all the 15s, i wanted to force synchronization instantly using chronyc makestep 0.1 3
, but it does not work.
My question: Is the chronyc makestep also need time to synchronize ?
The system clock is keeping time in UTC. Changing the time zone has no impact on that. You should make sure the chrony service is running to keep the clock synchronized for the whole time the system is running.
If for some reason the clock is thrown off (e.g. after VM migration), you can force an immediate resync, but
makestep
just allows the clock to be corrected by step instead of slow slew. You should add theburst
command to make a new set of measurements, like this:# chronyc -m 'burst 3/3' 'makestep 0.1 3'