emacs-devel
[Top][All Lists]
Advanced

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

[Patch] url-cache: wrong time in If-modified-since header


From: Diane Murray
Subject: [Patch] url-cache: wrong time in If-modified-since header
Date: Fri, 21 Sep 2007 00:16:12 +0200

`url-get-normalized-date' returns the local timezone's time yet states
that GMT is the timezone.  For example, when CEST is the local
timezone, "20 Sep 2007 01:19:04 GMT" gets sent to the server instead
of "19 Sep 2007 23:19:04 GMT".  This prevents URL from making proper
use of the cache.  The patch below fixes this.


2007-09-20  Diane Murray  <address@hidden>

        * url-util.el (url-get-normalized-date): Fixed to return the
        correct time when the local timezone isn't GMT.


Index: url-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url-util.el,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 url-util.el
--- url-util.el 25 Jul 2007 04:18:18 -0000      1.16.2.1
+++ url-util.el 19 Sep 2007 21:23:53 -0000
@@ -190,7 +190,7 @@
   (let* ((raw (if specified-time (current-time-string specified-time)
                (current-time-string)))
         (gmt (timezone-make-date-arpa-standard raw
-                                               (nth 1 (current-time-zone))
+                                               (current-time-zone)
                                                "GMT"))
         (parsed (timezone-parse-date gmt))
         (day (cdr-safe (assoc (substring raw 0 3) url-weekday-alist)))




reply via email to

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