Linux clock-setting script

William Park opengeometry at NOSPAM.yahoo.ca
Tue Jul 9 11:49:46 EDT 2002


William Park <opengeometry at nospam.yahoo.ca> wrote:
> Found it!
> 
> For those of you who need to set system clock only periodically, say once a
> day, here are methods that are available:
> 
> 1.  Network Time Protocol (RFC-1305, port 123):
>        ntpdate time.nist.gov ...
> 
>    'ntpdate' is part of standard NTP package on any Linux distribution.
> 
> 2.  Time Protocol (RFC-868, port 37):
>        netdate time.nist.gov ...
> 
>    Slackware includes 'netdate' as part of base TCP/IP package.  You can
>    use 'rdist' from

I meant 'rdate'... a typo.

>        ftp://ibiblio.org/pub/Linux/system/network/misc/
>    but it is now deprecated in favour of 'netdate'.
> 
> 3.  Daytime Protocol (RFC-867, port 13):
>        date -u -s `telnet time.nist.gov 13 | grep UTC | cut -f2,3 -d' '`
> 
>    This is shell solution that I've been after.
> 
> Of course, one the system clock is set, you can set the CMOS clock by
>    hwclock --systohc

-- 
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
8-CPU Cluster, Hosting, NAS, Linux, LaTeX, python, vim, mutt, tin



More information about the Python-list mailing list