geting the time from a remote computer
Gerhard Häring
gh at ghaering.de
Thu May 8 18:24:31 EDT 2003
kpop wrote:
> I have a problem with my system clock every time I start up the computer the
> wrong time is set. When i change it,It runs fine until the next time I boot
> up. I think the problem might be a low batery, and I intend to get a new
> one. In the meantime however I want to write a script in python that will
> automaticly reset my clock to the right time. [...]
The protocol that was invented for this purpose is called NTP, "Network
Time Protocol". I suggest you get a NTP client for your OS.
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
suggests you're using Windows. If you're using Windows 2000/XP (maybe it
works on NT, too), you already have an NTP client that you can use with
"NET TIME". Look into the Windows help or Google for details.
Another Windows NTP client that worked well for me is NetTime
(http://nettime.sourceforge.net/):
"""
NetTime is a simple time synchronization client for Windows
95/98/NT/2000. [...]
"""
No need to invent your own protocol and tools :-)
HTH,
-- Gerhard
More information about the Python-list
mailing list