Commit 5ff0ea96 authored by Per Cederqvist's avatar Per Cederqvist

(kom-status-person): Use mod instead of %, since floating point

	numbers can result from string-to-number in Emacs 21.
parent 5efbd407
2000-11-18 Per Starbck (commit by Per Cederqvist <ceder@moria>)
* commands2.el (kom-status-person): Use mod instead of %, since
floating point numbers can result from string-to-number in Emacs
21.
2000-10-05 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-sentinel): Use dead-ok argument to
......
......@@ -377,17 +377,13 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-format-insert 'no-of-sessions
(pers-stat->sessions pers-stat))
(if (zerop (pers-stat->total-time-present pers-stat))
nil
(lyskom-format-insert 'present-time-d-h-m-s
(/ (pers-stat->total-time-present pers-stat)
(* 24 3600))
(% (/ (pers-stat->total-time-present pers-stat)
3600) 24)
(% (/ (pers-stat->total-time-present pers-stat)
60) 60)
(% (pers-stat->total-time-present pers-stat)
60)))
(let ((time (pers-stat->total-time-present pers-stat)))
(unless (zerop time) ;; Why not let it print "0 d 00:00:00"?
(lyskom-format-insert 'present-time-d-h-m-s
(floor time (* 24 3600))
(mod (floor time 3600) 24)
(mod (floor time 60) 60)
(round (mod time 60)))))
(lyskom-format-insert 'last-log-in
(lyskom-return-date-and-time
(pers-stat->last-login pers-stat)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment