Re: date

 
Corthouts Carlo
Valued Contributor

date

Recently I started implementing ntp timesynchronisation, but at the moment they are using date -a sss.xxxx to slew time forward or backward.
As a difference is not immediately visible I wonder how the date -a is working. I know that the system clock is slowed down or sped up. But how long does it take for time to adjust with for example 60s.
5 REPLIES 5
Paula J Frazer-Campbell
Honored Contributor

Re: date

Hi

From man date

-a [-]sss[.fff]
Slowly adjust the time by sss.fff seconds (fff represents fractions of a second). This adjustment can be positive or negative. The system's clock will be sped up or slowed down until it has drifted by the number of seconds specified.


The .fff part of the command defines the speed of the slow up/down, so the speed is defined by the command that you enter.

Paula
If you can spell SysAdmin then you is one - anon
Stefan Farrelly
Honored Contributor

Re: date

I seem to recall it slews very slowly, 60s could take a day or two to sync.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Steven Gillard_2
Honored Contributor

Re: date

Slewing of the clock is performed by the adjtime(2) system call - see the man page for more information. The speed is not configurable, but from what I remember it is about 20% faster or slower than normal time - it seems to take about 5 minutes to perform a 1 minute change.

Theres a program that uses adjtime in the following thread (very last post):

http://bizforums.itrc.hp.com/cm/QuestionAnswer/0,,0x7d9303bbece8d5118ff40090279cd0f9,00.html

Regards,
Steve

Murgesh_2
Advisor

Re: date

If you need to step up the time with Immidiate you can use ntpdate

Slew will take 24 hrs apprx, i mean you can come in the morning and see that time is in sync.

Enjoy
Murgesh
john korterman
Honored Contributor

Re: date

Hi,

I have used this function on several occasions and has not yet been able to detect anything signifying if the function is in progress or not.
Anyway, I never try to slew more than 60 seconds at a time and I alway let 10 minutes pass between each execution. Not very precise, but till now this has worked for me.

regards,
John K.
it would be nice if you always got a second chance