procmail
[Top] [All Lists]

Re: Forcing valid date format in headers?

2001-04-06 16:33:06
* Stan Ryckman <stanr(_at_)sunspot(_dot_)tiac(_dot_)net> [010406 17:09] wrote:
Back on 23 March 2001, Alan Glover wrote:

I get some email with unusual date formats, eg:

Date: Wed Mar 21 07:23:08 AST 2001

I'd like to set up a procmail recipe that spots this, and rewrites the Date 
field.

What approach would you recommend

Recognizing, of course, that AST is not RFC-822 compliant. Quoting:

     zone        =  "UT"  / "GMT"                ; Universal Time
                                                 ; North American : UT
                 /  "EST" / "EDT"                ;  Eastern:  - 5/ - 4
                 /  "CST" / "CDT"                ;  Central:  - 6/ - 5
                 /  "MST" / "MDT"                ;  Mountain: - 7/ - 6
                 /  "PST" / "PDT"                ;  Pacific:  - 8/ - 7
                 /  1ALPHA                       ; Military: Z = UT;
                                                 ;  A:-1; (J not used)
                                                 ;  M:-12; N:+1; Y:+12
                 / ( ("+" / "-") 4DIGIT )        ; Local differential
                                                 ;  hours+min. (HHMM)

This is clearly US-of-A-centric, and mainland US-of-A-centric at
that. RFC 1123 corrects some small typos in regard to zones, and
goes on to state that the prefered indication is the numeric offset,
which is unambiguous and arguably fair to all. Perhaps an automated
response to correspondents whose mailers still generate non-compliant
headers should also be considered.

Computer should make life easier, yes?

-- 
Rik Kabel      old enough to be an adult      rik(_at_)panix(_dot_)com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>