From c859bc07c96484e5f8f31c24a0057a0fcf02a441 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 30 Jul 2019 13:08:21 +0200 Subject: [PATCH] Use decoded time accessors in timeclock * lisp/calendar/timeclock.el (timeclock-day-base): Use decoded time accessors. --- lisp/calendar/timeclock.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.39.2