🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by aaronb Wed, 29 Oct 2003 05:01
Date Format
#66988
Author: aaronb
Date: Wed, 29 Oct 2003 05:01
14 lines
1274 bytes
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?

Aaron


Re: Date Format
#66989
Author: Russ Allbery
Date: Wed, 29 Oct 2003 05:56
25 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads