Subject: Re: bug#50216: 27.2; timeclock gives incorrect time in mode-line

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 27 Aug 2021 03:13:32 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> I haven't really started debugging in, but the issue seems to be
> `timeclock-find-discrep' using some data that was computed before
> timeclock-workday was set...

Yup, that was it -- I made it flush the data on workday changes, and now
it displays correctly for me in the timelog test case -- that is, when
doing timelog-in, it'll use the current timelog-workday setting and
compute stuff correctly.

Note, however, that initial display when doing

(timeclock-mode-line-display 1)
(setq timeclock-workday (* 12 60 60))

will be incorrect -- because setting a variable like this won't trigger
mode-line updates.  (Until a minute has passed and it updates the line.)
So I've noted in the timeclock-mode-line-display doc string that this
shouldn't be done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no