Re: [chrony-users] Modifying system date and syncing back

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Sat, 26 Apr 2014, 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  ?

You do it with your first date command. chrony does not do much except watch
the rtc when it is offline as I recall. Thus the problem you will have is
possibly with the rtc calibration. Unless those actions take a long time, (hours) your clock should not drift
much and I would not do the makestep. chrony has not had a chance to make new
measurements, so it would be going on its oldmeasurements of the offset to
correct the offset which have no relation to the offsets that may be there
now.

But this kind of mashing the dates is really not a good idea, and it would not
surprise me if it did not cause other problems I cannot think of now.














On Sat, Apr 26, 2014 at 9:03 PM, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

      On Sat, 26 Apr 2014, mallapadi niranjan wrote:

            Greetings,

            I am  using Fedora 20 and running version chrony-1.29.1-1.fc20.x86_64,  I run certain automation scripts
            which requires to change
            system date , run some script and then change the date back.  currently i am doing the following

            chronyc -a offline
            date -s '1 month'
            <perform certain actions>
            chronyc -a online
            chronyc -a makestep


Why don't you change it back by a month after the actions with "date"? As it
is chrony has to struggle to figure out that tthe time is suddenly hugely
changed. And why in the world would you want to do the above?


      I would like to know if the above procedure is right, Any suggestions on what would be the best procedure to sync
      time in above
      scenario.

      Regards
      Niranjan



--
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.





--
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/