[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Utility to set PC clock



> Does anyone know a program that will get a time from some source on
> the net and set the system clock based on EST?  I could add it to my
> ip-up script and the computer would never fall far behind.

Firstly, I would recommend that you use universal coordinated time
(Greenwich Meantime or however you spell it) on your system clock.
Then you can set the timezone in software so that time shows up
properly.

Secondly, I think there is some way of getting your machine to automatically
adjust for time drift, but I don't know what it is.

Thirdly, here is how you can set your time from the net:

netdate is the command I used to get the time on the net.  Eg you could
do:

	netdate -v tick.usno.navy.mil

Sometimes a particular time server may be down, in which case you should
try another one.

To write the time to your hardware clock, you use the command hwclock.
For example, with your hardware clock on universal time:

        hwclock --systohc --utc

I think will do the trick.

Feel free to correct me anyone if I've made a mistake.

Cheers,

Mark.



_/~~~~~~~~\___/~~~~~~\____________________________________________________
____/~~\_____/~~\__/~~\__________________________Mark_Phillips____________
____/~~\_____/~~\________________________________mark@ist.flinders.edu.au_
____/~~\HE___/~~\__/~~\APTAIN_____________________________________________
____/~~\______/~~~~~~\____________________________________________________
__________________________________________________________________________
        "They told me I was gullible ... and I believed them!" 




Reply to: