#1
  1. No Profile Picture
    graphics monkey
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Georgia Tech, Atlanta, GA
    Posts
    70
    Rep Power
    13

    how to connect to an NTP server, retrieve time?


    I am new to python, I have used it a little but I am by no means fluent in it.

    I am trying to write a small function that simply connects to an NTP (time) server, retrieves the current time, and then sets the system's time according to what the time server said.

    Any help would be appreciated!

    Thanks
    Brian
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Hi,
    What platform is it?
    Here is bit of code
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211
    that gets the time.

    It should be possible to graft on the system clock stuff from here.

    grim

IMN logo majestic logo threadwatch logo seochat tools logo