I run openntpd so when I browse to http://wwp.greenwichmeantime.co.uk/ and type date in a console, the two times agree.
However, I have a digital clock applet in my lxpanel and use the format
%l:%M %a %e %b
If I include ":%S" the digital clock looks fine but when I remove the seconds and close the settings windows, the digital clock "minutes" field does not update until the "next-but-one top of the minute" but it updates to exactly one minute behind. It then updates "on the minute" but remains one minute behind system time.
11:10:05 digital clock including "%S" is showing correct minute (10)
11:10:10 I remove "%S" from clock settings window and close the window, lxpanel clock correctly shows 11:10
11:11:00 gmt website and "date" agree, lxpanel clock still showing 11:10
11:12:00 gmt website and "date agree, lxpanel updates to 11:11
I don't know when this behaviour started as I never have displayed seconds on my panel clock and I'm sure it used to synchronise with the FM radio timing "pips", or I'm going mad :cry:
Arch Linux package: lxpanel-0.5.6-1-x86_64 updated on my system 13th October
I think dclock.c line 154 is the problem, should end in " - 1" (years since I programmed in C)
time_t seconds = 60 - (current_time.tv_sec - (current_time.tv_sec / 60) * 60) - 1;
e.g. if "current_time.tv_sec" is 15 seconds past midnight, won't that mean "seconds" is set to 44, so the next timer interrupt happens 44 seconds later at 00:00:59 instead of 00:01:00?
Log in to post a comment.