]> git.eshelyaron.com Git - emacs.git/commitdiff
Use decoded time accessors in timeclock
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:08:21 +0000 (13:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:08:21 +0000 (13:08 +0200)
* lisp/calendar/timeclock.el (timeclock-day-base): Use decoded time
accessors.

lisp/calendar/timeclock.el

index 3735115a937c13862c73d649b6e5b31388beb2db..60586e7aceda8f29559a226b12022a81bfc6fcc3 100644 (file)
@@ -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)