crond, hwclock, and clockspeed

Lloyd Zusman <[email protected]> Mon, 12 Sep 2005 11:23:42 +0000 (UTC)
Newsgroups gmane.comp.lib.libtai
Message-ID <[email protected]>
I've got my linux box running with clockspeed, with "/etc/leapsecs.dat",
and with "/etc/localtime" pointing to a "right" timezone file, namely
"/usr/share/zoneinfo/right/America/New_York".

In most cases, my times are shown correctly.  For example, if I do the
test below, the times in the "Date:" header and in the body of the message
agree:

  (sntpclock 209.51.161.238 | clockview ; date) | mail -s date [email protected]

However, it looks like "crond" is not taking the leapseconds into account.
The following is an excerpt from /var/log/cron:

  Sep 12 07:07:39 home crond[6187]: (ljz) CMD (/opt/bin/eachminute 1>/dev/null 2>&1)
  Sep 12 07:08:39 home crond[6191]: (ljz) CMD (/opt/bin/eachminute 1>/dev/null 2>&1)

I have restarted crond with an explicit "TZ=right/America/New_York" in the
environment, but cron still seems to be ignoring the leapseconds.

Can anyone explain this and suggest a way to get "crond" to realize the
correct time?

Also, I have noticed the following behavior with the "hwclock" program:

  # (export TZ=right/America/New_York; hwclock --set --date="$(date '+%m/%d/%y
%H:%M:%S')"; hwclock --show; date)               
  Mon Sep 12 07:17:50 2005  -0.494631 seconds
  2005-09-12T07:18:11-0400
  # (export TZ=America/New_York; hwclock --set --date="$(date '+%m/%d/%y
%H:%M:%S')"; hwclock --show; date) 
  Mon Sep 12 07:19:10 2005  -0.497663 seconds
  2005-09-12T07:19:09-0400

It seems like the "hwclock" program only shows the correct time _without_
a "right" timezone, even though the rest of my system seems to be operating
correctly with "right" and with "/etc/leapsecs.dat".

Can someone help me understand this?

Thanks in advance.

-- 
 Lloyd Zusman
 [email protected]
 God bless you.