Psync - Pour synchroniser l'heure sur un serveur.

Psync peut être lancé à partir du menu Bureau.

 

PREMIEREMENT:
Si vous ne l'avez pas encore fait, à partir du menu/Bureau/Fuseau horaire définissez d'abord votre fuseau horaire géographique
correspondant.
i.e Europe/London - Europe/Paris etc. Déroulez la fenêtre des  fuseaux horaires et choisissez le bon.
NE CHOISISSEZ PAS le décalage GMT :  parce que la construction des commandes de ce script utilise des paramètres régionaux.
Si vous voulez absolument utiliser le décalage GMT, n'utilisez pas Psync.
Vous devez redémarrer pour rendre les nouveaux paramètres actifs. Et cela avant de lancer Psync.
Locale zoneinfo contains information on offset plus DST etc. (Daylight Savings Time) allowing Psync to set time correctly according to your location.
Setting the timezone this way also allows the desktop clock to auto change for DST.
GMT file is just a numerical offset etc. which means Psync may ignore it and set your clock according to server location. Which may be set to UTC and cause your clock to be set up to 2 hours off.

L'ECRAN:
This has buttons for choice of setting time by internet public time servers. To synchronise your computer to a time server press the button nearest to your location. This keeps the 'latency' low. i.e. time taken for signal to go back and forth on internet.


The offset shown in the display refers to the time difference between the 'motherboard' hardware clock, also known as RTC (Real Time Clock) and the 'system' clock.


RTC is kept going by a small battery when PC is powered off. Also known as a CMOS battery.
Remove the battery and usually the PC will reset to an arbitrary time in the past, say 1st January 1900 00:00:00, so if you do remove the battery, use a local time source
first to set the RTC. DON'T use this program.
The 'system' clock is set by the Puppy kernel on bootup and is then kept running by software 'ticks'.


Depending on accuracy of the software 'ticks' the system clock will drift from the RTC clock time. Especially if system is not powered down for some time.
Psync reads your RTC and your 'system clock' and shows the difference, usually a fraction of a second, unless you have never synchronised it before.
Psync will first read the clocks and then when a button is clicked will synchronise all clocks to a public time server. (A small window will confirm and show actual time difference)


Strangely, if the offset is different by an amount larger than say 3 minutes then the time 'set' may blank the display for some time whilst it resets the time.
It can be minutes or so before desktop returns.

Depending on the location of server, your ISP connection speed, your PC specs, etc. Then your time will always be out by a few milliseconds or so to 'atomic time'.
That is known as 'time' latency. Some users spend thousands to get closer to this time !!!

The Region buttons uses a separate program called 'ntpdate'.
This checks the 'active server pools', a set of servers that are actually online, against your time and averages the servers before making the time adjustment. This makes for more accurate setting.


Description  de 'ntpdate'
ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s) given, to determine the correct time.
A number of samples are obtained from each of the servers and a subset of the NTP clock filter and selection algorithms are applied to select the best of these.
Note that the accuracy and reliability of ntpdate depends on the number of servers, the number of polls each time it is run and the interval between runs.


Time adjustments are made by 'ntpdate' in one of two ways.

settimeofday() to step (set) the time. This method is used if the time is off by more than 128ms.

adjtime() to slew (gradually change) the time.

Slewing the time means to change the virtual frequency of the software clock to make the clock go faster or slower until the requested correction is achieved.

Slewing the clock for a larger amount of time may require some time, too.

For example standard Linux adjusts the time with a rate of 0.5ms per second.


The latter technique is less disruptive and more accurate when the error is small, and works quite well.

Possible précision :

Of course the final achievable accuracy depends on the time source being used. Basically, no client can be more accurate than its server. In addition the quality of network connection also influences the final accuracy. Slow and non predictable networks with varying delays are very bad for good time synchronization.

A time difference of less than 128ms between server and client is required to maintain NTP synchronization. The typical accuracy on the Internet ranges from about 5ms to 100ms, possibly varying with network delays. A recent survey suggests that 90% of the NTP servers have network delays below 100ms, and about 99% are synchronized within one second to the synchronization peer.

With PPS synchronization an accuracy of 50µs and a stability below 0.1 PPM is achievable on a Pentium PC (running Linux for example).

 

ENFIN :
I don't know about you, but I'm not getting hung up on setting any closer than a few milliseconds.

Rob Lane (tasmod on Puppy Forums)
GPL 2009.  - Traduction JJ Moulinier, Octobre 2011.