org-time-stamp: Simplify encode-time call

* lisp/org.el (org-time-stamp): Use org-time-string-to-time.

This should have been applied with a6cead0d2 (Backport commit
476066e89 from Emacs, 2019-02-22).
This commit is contained in:
Kyle Meyer 2019-08-18 12:26:05 -04:00
parent 74bf99502d
commit a23d0225ab

View file

@ -16045,8 +16045,7 @@ non-nil."
((org-at-timestamp-p 'lax) (match-string 0))))
;; Default time is either the timestamp at point or today.
;; When entering a range, only the range start is considered.
(default-time (and ts
(apply #'encode-time (org-parse-time-string ts))))
(default-time (and ts (org-time-string-to-time ts)))
(default-input (and ts (org-get-compact-tod ts)))
(repeater (and ts
(string-match "\\([.+-]+[0-9]+[hdwmy] ?\\)+" ts)