Commit ce2a8a6a authored by Dave Love's avatar Dave Love
Browse files

(timezone-make-date-arpa-standard): Autoload.

(date-to-time): Use it.
parent 9e30862d
......@@ -28,11 +28,21 @@
(require 'parse-time)
(autoload 'timezone-make-date-arpa-standard "timezone")
(defun date-to-time (date)
"Convert DATE into time."
(condition-case ()
(apply 'encode-time (parse-time-string date))
(apply 'encode-time
;; `parse-time-string' isn't sufficiently general or
;; robust. It fails to grok some of the formats that
;; timzeone does (e.g. dodgy post-2000 stuff from some
;; Elms) and either fails or returns bogus values. Lars
;; reverted this change, but that loses non-trivially
;; often for me. -- fx
(timezone-make-date-arpa-standard date)))
(error (error "Invalid date: %s" date))))
(defun time-to-seconds (time)
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