Re: [chrony-users] Modifying system date and syncing back |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
On Sat, Apr 26, 2014 at 10:53:17PM +0530, mallapadi niranjan wrote:
> we have certain automation testing where we expire certs by moving
> date, We currently do move the date back by date command ,
>
> example:
>
> chronyc -a offline
> date -s '1 month'
> <perform certain actions>
> date -s '1 month ago'
> chronyc - a online
> chronyc -a makestep
>
> what i would like to know is can we modify the date after making the
> time source offline ?
I wouldn't recommend doing that. Even if you set the time back to
where it would be it wasn't stepped, and no measurements were made in
that period, it could still trigger some code in chronyd which tries
to detect backward clock jumps and invalidate old samples, or upset
it enough that it would take longer time to recover.
A better approach would be to make chronyd step the clock via the
manual feature. For example:
chronyc -a 'manual on' (or enable it in chrony.conf)
chronyc -a -m 'offline' 'settime 1 month' 'makestep' 'manual reset'
chronyc -a -m 'settime 1 month ago' 'makestep' 'manual reset' 'online'
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.