Hi there!

On 29 Jan 00, at 23:30, Michael Heydekamp wrote
    about "Re: Solution to %DATE and %TIME macro":

> AVK> So in your template you are now able to write something like:
> 
> AVK> On %SUBPATT="2", when it was %SUBPATT="3" on your 
> AVK> local clock -- and you live in timezone GMT%SUBPATT="4" --- 
> AVK> you wrote me:
> 
> I know this is a fairly old thread but nonetheless I wanted a) to thank
> the guys who invented this interesting solution, 

No problem;-)

> and b) to ask a question that came up today: 
> 
> I received eMail from an AOLer; his date header reads:
> 
> > Date: Sat, 29 Jan 2000 14:18:53 EST

Well, you see, he's quite right here;-( RFC822 states that either three-letter 
abbreviation or the four-digit one is to be used... Although RFCs say that 
preferrably the four-digit one should be used, stricktly speaking, that AOL guy 
is kind of right.

The major problem here is that TB doesn't understand what this funny EST 
means and therefore the sorting on date would probably fail on such 
messages. This behaviour AFAICS can be fixed only by RIT labs right now...

> Argh.  The correct timezone (-0500) is nonetheless included in one of
> the "Received:" headers:
> 
> > Received: from [EMAIL PROTECTED] by imo18.mx.aol.com (mail_out_v24.8.)
> > id 5.17.11e7f9d (4367) for <[EMAIL PROTECTED]>; Sat, 29
> > Jan 2000 14:18:53 -0500 (EST)
> 
> Any idea how to get the correct timezone (EST is not a very meaningful
> indication to me) in the template in such cases?

Can probably be done with yet another regexp;-) It would be simple if the 
corresponding Received: was the *first* one in the headers, but the problem is 
that it's the *last* one... So one needs to:
1. get this idiotic EST or whatever from the Date: header
(for example: Date\:.*?([\w]{3})\n);
2. then search for the regexp ([+-][\d]{4})\s*?\(THREE\),
where THREE denotes the result of the item 1. above.

How to combine these two... well, it's kinda interesting question;-) Maybe it 
would be better to wait for ver. 2, when it will become possible to make a 
plugin taking care of such issues...

> Can we be sure to *always* find the correct timezone in one of the
> "Received:" headers?

Nope, AFAIK.

-- 
SY, Alex
(St.Petersburg, Russia)
http://mph.phys.spbu.ru/~akiselev
--- 
Thought for the day:
  Intuition (n): an uncanny sixth sense which tells people
  that they are right, whether they are or not.

--- 
PGP public keys on keyservers:
0xA2194BF9 (RSA);   0x214135A2 (DH/DSS)
fingerprints:
F222 4AEF EC9F 5FA6  7515 910A 2429 9CB1 (RSA)
A677 81C9 48CF 16D1 B589  9D33 E7D5 675F 2141 35A2 (DH/DSS) 
--- 

-- 
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
   <mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
   <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------

Reply via email to