Article View: news.software.nntp
Article #66989Re: Date Format
From: Russ Allbery
Date: Wed, 29 Oct 2003 05:56
Date: Wed, 29 Oct 2003 05:56
25 lines
1960 bytes
1960 bytes
aaronb <borgaaron@yahoo.com> writes:
> I am trying to format the Date field of the Header and am having
> difficulties. I have a sample of dates from 1 server that look like
> this:
> Wed, 29 Oct 2003 04:23:18 GMT
> Wed, 29 Oct 2003 06:59:34 -0000
> 29 Oct 2003 04:40:12 GMT
> What consistent method could I use to change the date format for my
> program?
See RFC 2822, which has the formal syntax for the Date header. Note that
you'll want to support the obsolete syntax at least to the extent of
supporting the GMT suffix.
You may also want to look at, e.g., lib/date.c in the INN distribution for
already-written date parsing code.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<871xswsi2k.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!nntp1.fuse.net!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailReferences:
<3f9f4a6c$0$42783$c3e8da3@news.astraweb.com>Show Full Headers
Complete Article Headers
Message-ID: <871xswsi2k.fsf@windlord.stanford.edu> Subject: Re: Date Format Date: Tue, 28 Oct 2003 21:56:19 -0800 From: Russ Allbery <rra@stanford.edu> References: <3f9f4a6c$0$42783$c3e8da3@news.astraweb.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!nntp1.fuse.net!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 25 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1067406980 11477 171.64.19.147 (29 Oct 2003 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Common Lisp, linux) Cancel-Lock: sha1:7o2MmdxyJvFxg7YX+VAMftHV518=