changeset 33376:940adf5fe1c0

(timezone-make-date-arpa-standard): Autoload. (date-to-time): Use it.
author Dave Love <fx@gnu.org>
date Fri, 10 Nov 2000 18:00:36 +0000
parents d7d4bd9d131c
children e16be74deee2
files lisp/gnus/time-date.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/time-date.el	Fri Nov 10 17:37:31 2000 +0000
+++ b/lisp/gnus/time-date.el	Fri Nov 10 18:00:36 2000 +0000
@@ -28,11 +28,21 @@
 
 (require 'parse-time)
 
+(autoload 'timezone-make-date-arpa-standard "timezone")
+
 ;;;###autoload
 (defun date-to-time (date)
   "Convert DATE into time."
   (condition-case ()
-      (apply 'encode-time (parse-time-string date))
+      (apply 'encode-time
+	     (parse-time-string
+	      ;; `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)