From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: make standard If-Modified-Since headers Date: Wed, 27 Feb 2008 22:24:07 +0000 Message-ID: <47C5E307.6070200@gnu.org> References: <86pruy3q6p.fsf@lifelogs.com> <873arfl1ui.fsf_-_@jidanni.org> <867igqtp1g.fsf@lifelogs.com> <87ejayjuf8.fsf@ambire.localdomain> <863aretkoj.fsf@lifelogs.com> <86y796s33o.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204151074 32616 80.91.229.12 (27 Feb 2008 22:24:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2008 22:24:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 23:24:59 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUUhp-00012Q-3S for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 23:24:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUUhI-0007sF-Ox for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 17:24:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUUhD-0007ms-5P for emacs-devel@gnu.org; Wed, 27 Feb 2008 17:24:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUUhB-0007jk-KO for emacs-devel@gnu.org; Wed, 27 Feb 2008 17:24:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUUhB-0007jU-Dc for emacs-devel@gnu.org; Wed, 27 Feb 2008 17:24:13 -0500 Original-Received: from mk-outboundfilter-3.mail.uk.tiscali.com ([212.74.114.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUUhB-0000I8-2j for emacs-devel@gnu.org; Wed, 27 Feb 2008 17:24:13 -0500 Original-X-Trace: 50222618/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$ACCEPTED/freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEdyxUdTQxds/2dsb2JhbAAIkiucNg X-IP-Direction: OUT Original-Received: from i-83-67-23-108.freedom2surf.net (HELO [127.0.0.1]) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Feb 2008 22:24:11 +0000 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: <86y796s33o.fsf@lifelogs.com> X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90656 Archived-At: Ted Zlatanov wrote: > The specific function change I am proposing, so we have a specific > reference point: > > (defun url-get-normalized-date (&optional specified-time) > "Return a 'real' date string that most HTTP servers can understand." > (let ((system-time-locale "C")) > (format-time-string "%a, %d %b %Y %T %Z" > (or specified-time (current-time))))) > > Will this work on all systems? It avoids the hardcoded week and month > abbreviations through the locale specification, but I can only test that > on Linux. > IIRC, only a small subset of timezone names are allowed in HTTP headers, so %z would be better than %Z, or alternatively hardcode GMT: ... (format-time-string "%a, %d %b %Y %T GMT" (or specified-time (current-time)) t) ... %Z seems to give an empty string here (Windows XP), but that is probably a bug.