4577670 [rkeene@sledge /home/rkeene/devel/htp/mirror]$ cat download.html
HTTP Time Protocol (HTP)home »

HTP: HTTP Time Protocol

IntroductionThe solution: HTPDownload (Perl)Download (C)


HTP software

A ntpdate lookalike is available, which does a one-time time synchronisation to a web server of your choose. Since version 0.9.1 also a htpd ("ntpd") time daemon is available. Both time clients are written in Perl and provides time synchronisation support for HTTP/HTTPS websites (depending on your Perl LWP module installation) optional via a proxy server. Support for proxy servers that require (basic) authentication is also new in 0.9.1.

# ./htpdate -h

htpdate 0.9.1
Usage: ./htpdate [-dhqx] <URL>

        -d      debug
        -h      show this help
        -q      quiet
        -x      do not set the time (only show)

        e.g. ./htpdate -x http://www.microsoft.com

# ./htpdate http://www.microsoft.com
http://www.microsoft.com => 7 seconds
Time is set to Wed Aug 25 20:54:41 2004

For good accuracy choose a web server close to you

The execution of this htpdate script could be automated in a cron entry or be part of an init script run at boot time. Be aware that the script makes a step in time and some programs (e.g. database) do not always appreciate a step backwards in time. The C version of htpdate doesn't step but adjusts the time smoothly.

Htpdate has been tested with Cygwin and Linux, but should work on any platform with Perl (and LWP modules). In many Perl distributions LWP is included by default. A version written in C is located here.

A htpd daemon version - ntpd lookalike - is available since version 0.9.1. Htpd handles responses of multiple web servers and chooses the best of the list to synchronize with. The polling interval of htpd increases and decreased automatically as needed.

# ./htpd -d
....
Number of the succesfull hits 6
- 2     http://www.microsoft.com
* 1     http://www.ntp.org
- 0     http://www.perl.org
* 1     http://www.samba.org
* 1     http://www.ibm.com
* 1     https://www.redhat.com
Next poll in about 7200 seconds

Current release - daytime, htpdate, htpdate-light, htpd

htp-0.9.3.tar.gz version 0.9.3
htp-0.9.3.tar.bz2 bzipped version 0.9.3
htp-0.9.3.zip zipped version 0.9.3

For previous releases look in the archive

mail Eddy Vervest
4577671 [rkeene@sledge /home/rkeene/devel/htp/mirror]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2005-11-22 18:23:13