diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-08-27 09:45:34 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-08-27 09:45:34 -0600 |
commit | 2a400ef016f7d658e7712fd2340aed291c1c61d5 (patch) | |
tree | 9b87ac5aa744f6e86a68c54099fa196bb81323d7 | |
parent | 344163403b648fc3a3097d6d3c1ede1deef55d00 (diff) | |
parent | 3a06bc3730685444bf6c538eed2d631b8d660401 (diff) | |
download | org-mode-2a400ef016f7d658e7712fd2340aed291c1c61d5.tar.gz |
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
-rw-r--r-- | lisp/org-clock.el | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 4fa0397..5e4f4ef 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1971,10 +1971,22 @@ the currently selected interval size." (when block (setq cc (org-clock-special-range block nil t) ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) - (if ts (setq ts (org-float-time - (apply 'encode-time (org-parse-time-string ts))))) - (if te (setq te (org-float-time - (apply 'encode-time (org-parse-time-string te))))) + (cond + ((numberp ts) + ;; If ts is a number, it's an absolute day number from org-agenda. + (destructuring-bind (month day year) (calendar-gregorian-from-absolute ts) + (setq ts (org-float-time (encode-time 0 0 0 day month year))))) + (ts + (setq ts (org-float-time + (apply 'encode-time (org-parse-time-string ts)))))) + (cond + ((numberp te) + ;; Likewise for te. + (destructuring-bind (month day year) (calendar-gregorian-from-absolute te) + (setq te (org-float-time (encode-time 0 0 0 day month year))))) + (te + (setq te (org-float-time + (apply 'encode-time (org-parse-time-string te)))))) (setq p1 (plist-put p1 :header "")) (setq p1 (plist-put p1 :step nil)) (setq p1 (plist-put p1 :block nil)) |