From: Lars Ingebrigtsen Date: Tue, 30 Jul 2019 11:08:21 +0000 (+0200) Subject: Use decoded time accessors in timeclock X-Git-Tag: emacs-27.0.90~1817^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c859bc07c96484e5f8f31c24a0057a0fcf02a441;p=emacs.git Use decoded time accessors in timeclock * lisp/calendar/timeclock.el (timeclock-day-base): Use decoded time accessors. --- diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index 3735115a937..60586e7aced 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -1139,9 +1139,9 @@ discrepancy, today's discrepancy, and the time worked today." "Given a time within a day, return 0:0:0 within that day. If optional argument TIME is non-nil, use that instead of the current time." (let ((decoded (decode-time time))) - (setcar (nthcdr 0 decoded) 0) - (setcar (nthcdr 1 decoded) 0) - (setcar (nthcdr 2 decoded) 0) + (setf (decoded-time-second decoded) 0) + (setf (decoded-time-minute decoded) 0) + (setf (decoded-time-hour decoded) 0) (encode-time decoded))) (defun timeclock-mean (l)