🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #50768

Re: Format for date in Article

#50768
From: Terrance Richard Boyes
Date: Fri, 23 Feb 2001 19:27
31 lines
2847 bytes
Anand Gupta <prence@aclindia.net> wrote:
> I would like to pick the Date header from the article body.
> There are two headers that I see NNTP-posting-date: and Date: 
> I would like to use the header which has a consistent format.
> All my posts are coming from a single server. Which of the two headers
> can I use to have a consistent format for the date ?

Date: may be added by the newsreader or the first server it is
posted to, so you may get some slight inconsistencies even if
all articles were originally posted to the same server.

NNTP-Posting-Date: may be added by the first server it is
posted to, OTOH it may not be added at all as it is not a
mandatory header. It is unlikely to be added by newsreader
software, though it could be...

So iff all articles are originally posted to the same server,
and it always rewrites any date that's already there can you
be certain that the date will be consistent.

Last time I had to deal with dates in multiple formats
I was using Oracle, so rather than spend lots of effort
trying to parse the string I instead just threw the string
at the date() function with the most likely format, if
that failed I tried the next most likely format, and so on.

-- 
<URL:http://www.pierrot.co.uk/>                                  Team AMIGA
Visit beautiful Wisconsin Dells.

Technical Details
Message-ID: <20010223.192700.9E9801DE.mpaa@pierrot.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
References: <3a967c7e.37419301@news.alt.net>

Show Full Headers
Complete Article Headers
Message-ID: <20010223.192700.9E9801DE.mpaa@pierrot.co.uk>
Subject: Re: Format for date in Article
Date: Fri, 23 Feb 2001 19:27:00 +0000
From: tez@pierrot.co.uk (Terrance Richard Boyes)
References: <3a967c7e.37419301@news.alt.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
Newsgroups: news.software.nntp
Organization: ECL.Net
X-Trace: mail2news.demon.co.uk 982956431 mail2news:29760 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!anchor-post-34.mail.demon.net!pierrot.demon.co.uk!pierrot.co.uk!tez@pierrot.co.uk
X-Lan-Trace: news.pierrot.lan 20010223.192700 news:mpaa IDENT tez@pierrot.demon.co.uk
User-Agent: tin/1.4.3-20000502 ("Marian") (AMIGA)
X-Cancel-Lock: TEZT:6b6eb6ca9306141cd60a85d20fd68c82 22a446aae44aba9a4085550080ea081b
X-PGP-Keyfile: <URL:http://www.pierrot.co.uk/pgpauth/>
X-PGP-Fingerprint: 20 66 0F E8 85 64 9C 2C 6F 82 6F 19 6C 2F 6A 1D
X-PGP-Auth: pub 512/3A14C4B9 1999/04/22 Tez Boyes <tez@pierrot.co.uk> iQBVAwUBOpa5iEXush46FMS5AQGhXwH8CzV3W57i5KvMPg1IGLn3zVBhUESEtNyE ybHjwpJRgDURTahrwlg24hXi/B3jUddo8oHM8isoTpp2rgTAKoJNGw== =jITH
X-NaMLServ: $VER: v0.9b <tez@pierrot.co.uk>
Lines: 30