Skip to content

Commit

Permalink
truncate seconds when using hh:mmam/pm diary style times
Browse files Browse the repository at this point in the history
Signed-off-by: Psionik K <[email protected]>
  • Loading branch information
psionic-k committed May 15, 2024
1 parent e1408bf commit 4063d5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lisp/champagne.el
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ degenerate. Returns nil if TIME-STRING is invalid according to
(hhmm (unless (< hhmm 0) hhmm)))
(setf (decoded-time-minute now) (% hhmm 100))
(setf (decoded-time-hour now) (/ hhmm 100))
(setf (decoded-time-second now) 0)
(let ((time (time-convert (encode-time now) 'list)))
(if (time-less-p (current-time) time)
time
Expand Down

0 comments on commit 4063d5e

Please sign in to comment.