emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/url/url-util.el, v [EMACS_22_BASE]


From: Teodor Zlatanov
Subject: [Emacs-diffs] Changes to emacs/lisp/url/url-util.el, v [EMACS_22_BASE]
Date: Thu, 28 Feb 2008 19:41:45 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Teodor Zlatanov <tzz>   08/02/28 19:41:44

Index: url-util.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-util.el,v
retrieving revision 1.16.2.5
retrieving revision 1.16.2.6
diff -u -b -r1.16.2.5 -r1.16.2.6
--- url-util.el 7 Jan 2008 02:23:00 -0000       1.16.2.5
+++ url-util.el 28 Feb 2008 19:41:44 -0000      1.16.2.6
@@ -186,32 +186,9 @@
 ;;;###autoload
 (defun url-get-normalized-date (&optional specified-time)
   "Return a 'real' date string that most HTTP servers can understand."
-  (require 'timezone)
-  (let* ((raw (if specified-time (current-time-string specified-time)
-               (current-time-string)))
-        (gmt (timezone-make-date-arpa-standard raw
-                                               (current-time-zone)
-                                               "GMT"))
-        (parsed (timezone-parse-date gmt))
-        (day (cdr-safe (assoc (substring raw 0 3) url-weekday-alist)))
-        (year nil)
-        (month (car
-                (rassoc
-                 (string-to-number (aref parsed 1)) url-monthabbrev-alist)))
-        )
-    (setq day (or (car-safe (rassoc day url-weekday-alist))
-                 (substring raw 0 3))
-         year (aref parsed 0))
-    ;; This is needed for plexus servers, or the server will hang trying to
-    ;; parse the if-modified-since header.  Hopefully, I can take this out
-    ;; soon.
-    (if (and year (> (length year) 2))
-       (setq year (substring year -2 nil)))
-
-    (concat day ", " (aref parsed 2) "-" month "-" year " "
-           (aref parsed 3) " " (or (aref parsed 4)
-                                   (concat "[" (nth 1 (current-time-zone))
-                                           "]")))))
+ (let ((system-time-locale "C"))
+  (format-time-string "%a, %d %b %Y %T GMT"
+   (or specified-time (current-time)) t)))
 
 ;;;###autoload
 (defun url-eat-trailing-space (x)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]