Fix start date in workload overview report to midnight

This is the expected behavior: when no start date is given, it should default to
today (the whole day), and not exactly now, so that day increments do not start
in the mid of the day, yielding misleading results.
This commit is contained in:
Daniel Borchmann 2023-01-11 21:08:24 +01:00
parent 28b2047ad6
commit 2423dcf6cd
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625

View File

@ -545,7 +545,7 @@ PARAMS is a property list of the following parameters:
`:start-date': `:start-date':
Start date for the workload report. When not provided, will Start date for the workload report. When not provided, will
default to no start date. When provided, must be in a format default to today at 00:00. When provided, must be in a format
understood by `org-read-date'. understood by `org-read-date'.
`:end-date': `:end-date':
@ -575,7 +575,7 @@ PARAMS is a property list of the following parameters:
(org-ql-match (or (plist-get params :org-ql-match) (org-ql-match (or (plist-get params :org-ql-match)
'(todo))) '(todo)))
(current (or start-date (current (or start-date
(org-read-date nil nil "."))) (org-read-date nil nil ". 00:00")))
(date-range nil)) (date-range nil))
;; Check input ;; Check input