unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Patch] url-cache: wrong time in If-modified-since header
@ 2007-09-20 22:16 Diane Murray
  2007-09-21  2:54 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Diane Murray @ 2007-09-20 22:16 UTC (permalink / raw)
  To: emacs-devel

`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  <disumu@x3y2z1.net>

	* 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)))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] url-cache: wrong time in If-modified-since header
  2007-09-20 22:16 [Patch] url-cache: wrong time in If-modified-since header Diane Murray
@ 2007-09-21  2:54 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2007-09-21  2:54 UTC (permalink / raw)
  To: Diane Murray; +Cc: emacs-devel

Diane Murray wrote:

> 2007-09-20  Diane Murray  <disumu@x3y2z1.net>
>
> 	* url-util.el (url-get-normalized-date): Fixed to return the
> 	correct time when the local timezone isn't GMT.

That's not quite accurate, since it only failed if the zone name was
not one it knew about. Anyway, nit-picking aside, applied. Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-21  2:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-20 22:16 [Patch] url-cache: wrong time in If-modified-since header Diane Murray
2007-09-21  2:54 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).