summaryrefslogtreecommitdiff
path: root/lisp/calendar/timeclock.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-07-30 13:08:21 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-07-30 13:08:21 +0200
commitc859bc07c96484e5f8f31c24a0057a0fcf02a441 (patch)
treef93c27394a06318b88a52917625b8f4e44f39687 /lisp/calendar/timeclock.el
parente9e1b0af354aa1672429729ff1e0f48370ce362f (diff)
downloademacs-c859bc07c96484e5f8f31c24a0057a0fcf02a441.tar.gz
Use decoded time accessors in timeclock
* lisp/calendar/timeclock.el (timeclock-day-base): Use decoded time accessors.
Diffstat (limited to 'lisp/calendar/timeclock.el')
-rw-r--r--lisp/calendar/timeclock.el6
1 files 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)