Changes in 1.0.7

- Fixed a part of the incorrect bug fix in 1.0.6.


- Bug fix for
(Thanks Diego Augusto Molina for the bug report and Pavel Kazakov for


- Change of e-mail/website
- Fix for debian build


- Fixed a memory leak (reported and fixed by Andreas Bohne-Lang)


- Fixed logic error... 1.0.2 is broken :(


- Fixed a buffer overflow when time offset gets to large


- Added "burst mode" (-b) to enhance accuracy.
- Extended debug output
- Removed potential buffer overflows vulnerabilities.
- Replaced usleep by nanosleep (which is more portable).
- Included debian package.


- Cleanup/simplified the code.
- Again a more robust implementation of the "-p" (precision) switch.


- Bug fixes: poll loop could be become close to zero in case of a "connection
failed". Sleeptime wasn't correct in case all hosts fail.
- Use more "sane" minsleep and maxsleep values.


- The use of the ntp_adjtime system call is now optional. The clock
  frequency will be adjusted when using the "-x" switch and the systematic
  drift will be compensated. Works only in daemon mode.


- Htpdate can drop root privileges and run as a restricted user.
- Drift calculation starts now after first time correction.


- Mostly code cleanup
- Changed "char" variables into "int", which should be more efficient
- Changed the qsort routine, into an insertion sort. Quicksort is
  kind of overkill for such small lists.
- Debug mode is allowed in daemon mode.


- Speeded up the poll cycle loop, once a time offset has been detected.
- Added systematic drift to the syslog logging (daemon only).
  The "" script may help to reduce the drift of your
  system clock.
- Changed "precision" from micro into milliseconds.
- Changed manpage directory from /usr/man into /usr/share/man.
- HTTP/1.1 has become the default


- Bug fix: with precision set, the time could only be adjusted
  negative (slow down).
- Fixed undesired effects in (rare) cases when using only a few servers.
- Exit code changed to 1 if no server was found (requested by Supernaut).


- Reintroduction of the "-p" switch. The "precision" determines more accurate
  when a time adjustment is needed. The implementation of precision is much
  beter than the one in the past.


- Changed the variable type of "param" from char into int (thanks to
  Arnaud Mazin). GCC 3.4.x is less forgiving than older versions.
- Made compare function for qsort more robust (avoiding overflow).


- Finaly added IPv6 support!
- If you would lose internet connectivity, htpdate would flood the system
  (CPU and log). A patch submitted by Peter Surda, has been included.
- Removed -0 switch (HTTP/1.0), since this is the default anyway.


- Fixed that "when" wasn't properly initialized in every poll cycle. This
  bug fix reduces jitter when system time is close to the correct time.
- Added missing "-t" switch to the manpage.
- Added warning message if more than 16 servers are specified.
- Htpdate double forks now, like a proper daemon :)
- vim setting are added to the source (set ts=4)


- Fixed a major bug in offset calculation (caused by changing the rtt type
  from double to unsigned long)

0.8.1 (broken)

- Correction install paths in Makefile, added uninstall option
- Added "-t" switch, which disables time sanity checking (requested for
  devices, like supported by openwrt, which boot/startup at "epoch" time)


- Lots of code clean up, eg.:
        - compiles with the -ansi switch (for better portability, but only
          tested on Linux and FreeBSD)
        - Compiles with Tiny C Compiler (tcc) and Intel C compiler (icc)
        - Restored compatibility with FreeBSD (timezone calculation).
- A second poll is made if a time offset has been detected.
- Removed the switches "-t" and "-x". In daemon mode htpdate will only adjust
  time. With the "-s" switch htpdate will set the time once at startup and
  after that only smooth adjusts are made.
- Added "-l" switch, which enables logging to syslog in non-daemon mode.
  Convinient if htpdate is used from cron.
- Added "-0" to make an HTTP/1.0 request and "-1" for HTTP/1.1


- Minor bug fix. When running in daemon mode TCP connections weren't cleaned up
  properly (sockets remained in CLOSE_WAIT status).


- Bug fix. Poll cycle could become very very short (seconds...) in some


- The polling mechanisme has been improved once more :)
  As of this version polls are also spread within the polling cycle.
  This way a time offset will be detected earlier, without increasing the
  polling frequency.
- Sleeptime isn't writen to syslog anymore, only time adjustments
- Previous versions of htpdate tried to close a already closed HTTP/1.0
- The rpm version doesn't override the init-script anymore


- Bug fix, time wasn't correct if 'timeavg' was negative...


- Code clean up, use global variable 'timezone'


- New poll schedule mechanisme has been introduced!
  This results in a better spreading of the polls in time to
  gain some extra accuracy.
- Removed the -p (precision) flag, because it has become obsolete with
  the new poll scheduling mechanisme.
- Extended 'debug mode' output with round trip time (rtt) information.
- Sleeptime parameters are no longer in seconds, but in 2^n seconds.


- Added relevant header files, so gcc -Wall compiles without warnings.
- Added -p switch, to set the precision of htpdate. The polling rate
  is affected by this switch (high precision -> more frequent polling).


- Spread the individual time polls better, to gain accuracy with
  a small number of web servers as source
- Added debug mode, so you can value the quality of the timestamps
  from web servers
- Minor correction on HEAD request (removed max-age=0)
- pid file is created
- Added htpdate init script


- Run htpdate as a daemon
        - automatic set/adjust time, based upon offset
        - automatic poll interval
- Added manpage
- Added RPM
- Minor bug fixes


- Htpdate can set or adjust time smoothly now, without calling external


- Initial release. Htpdate extracts the raw timestamp from a webserver.

Topic revision: r10 - 20 Sep 2013, EddyVervest

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback