🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Jan Krumsiek Mon, 19 Feb 2001 21:40
ARPANET date?
#50726
Author: Jan Krumsiek
Date: Mon, 19 Feb 2001 21:40
10 lines
1347 bytes
i'm writing a function that converts the "Date" line in a usenet-article 
header into "real" dates (vb-dates or something like this).

the rfc says that the date-header line contains a ARPANET date?! what is 
this? is there a definition for this somewhere??
are all time-zones allowed in this date and does anybody know where to 
find definitions for all time-zones??

Jan Krumsiek
Re: ARPANET date?
#50733
Author: Russ Allbery
Date: Tue, 20 Feb 2001 00:26
20 lines
1798 bytes
Jan Krumsiek <Jan.Krumsiek.Nospam@gmx.de> writes:

> i'm writing a function that converts the "Date" line in a usenet-article
> header into "real" dates (vb-dates or something like this).

> the rfc says that the date-header line contains a ARPANET date?! what is
> this? is there a definition for this somewhere??  are all time-zones
> allowed in this date and does anybody know where to find definitions for
> all time-zones??

See RFC 822.  Thankfully, you don't have to parse *all* time zones, just
the US ones (and possibly the military ones, although no one uses them any
more).

-- 
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.
Re: ARPANET date?
#50737
Author: 101 Meowbots
Date: Tue, 20 Feb 2001 03:30
35 lines
2732 bytes
Jan Krumsiek <Jan.Krumsiek.Nospam@gmx.de> wrote:

> i'm writing a function that converts the "Date" line in a usenet-article 
> header into "real" dates (vb-dates or something like this).

You are wandering into murky waters here.  If you want to
sort/search/compare dates, you are going to have to parse the things,
and that's that.  If, however, you only want to display dates, you can
save yourself much aggravation by simply displaying the unmodified
header contents.

> the rfc says that the date-header line contains a ARPANET date?! what is 
> this? is there a definition for this somewhere??

ARPANET was the original project for which the Internet protocols were
devised.

> are all time-zones allowed in this date and does anybody know where to 
> find definitions for all time-zones??

You want two documents, RFC 822 (the mail message format on which news
articles are based) and RFC 1123, containing important corrections to
RFC 822.  The most important correction is in the year field.  It was
originally specified as two digits but changed to four.

You will need to expect both forms of the year, and should expect to
see some lingering Y2K problems.  The current year may appear as 2001,
101, 01, 19101, and possibly other interesting variations, so your
parser will need to be flexible.

If you can find an existing mail/date library to use, try it before
writing your own.  This problem has a habit of spawning years-long
debugging cycles, so advantage of k0dez that have already been through
that ordeal.
Re: ARPANET date?
#50736
Author: uhlar
Date: Tue, 20 Feb 2001 08:08
12 lines
1567 bytes
Russ Allbery <rra@stanford.edu> wrote:
-> See RFC 822.  Thankfully, you don't have to parse *all* time zones, just
-> the US ones (and possibly the military ones, although no one uses them any
-> more).

why?

-- 
 Matus "fantomas" Uhlar, sysadmin at NEXTRA, Slovakia; IRCNET admin of *.sk
 uhlar@fantomas.sk ; http://www.fantomas.sk/ ; http://www.nextra.sk/
 I just got lost in thought. It was unfamiliar territory. 
Re: ARPANET date?
#50738
Author: Meridian Meowbot
Date: Tue, 20 Feb 2001 13:30
23 lines
2129 bytes
uhlar <uhlar@fantomas.sk> wrote:

> Russ Allbery <rra@stanford.edu> wrote:
> -> See RFC 822.  Thankfully, you don't have to parse *all* time zones, just
> -> the US ones (and possibly the military ones, although no one uses them any
> -> more).

> why?

This and more is explained in RFC 1123:

         [...]
         There is a strong trend towards the use of numeric timezone
         indicators, and implementations SHOULD use numeric timezones
         instead of timezone names.  However, all implementations MUST
         accept either notation.  If timezone names are used, they MUST
         be exactly as defined in RFC-822.

         The military time zones are specified incorrectly in RFC-822:
         they count the wrong way from UT (the signs are reversed).  As
         a result, military time zones in RFC-822 headers carry no
         information.
Re: ARPANET date?
#50739
Author: Frank Slootweg
Date: Tue, 20 Feb 2001 15:28
12 lines
1479 bytes
101 Meowbots <meowbot@meowing.net> wrote:
[deleted]
> If you can find an existing mail/date library to use, try it before
> writing your own.  This problem has a habit of spawning years-long
> debugging cycles, so advantage of k0dez that have already been through
> that ordeal.

  Indeed. AFAIK, also most newsreaders do this, so you may want to see
if you can 'borrow' code from those. I use tin, which (AFAIK) is sort-of
open source, so you may want to contact it's maintainer about this code.
(http://www.tin.org)
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