Hello Daniel,
On Saturday, November 16, 2002 at 11:39 GMT -0500, legend has it that
Daniel Grunberg [DG] recited the incantation:
DG> Is there a way I can fix my template, so that "EST" or "EDT" will be
DG> given in the quote, in automatic accordance with my system time?
DG> I have no idea of how to do it, but I thought that I might want to:
DG> 1. Compute (or get) the original message's GMT hour.
DG> 2. Compute the difference between the message's GMT hour and the
DG> %OTIME hour.
DG> 3. If the difference is 5 hours, "EST" will be used.
DG> 4. If the difference is not 5 hours "EDT" will be used.
Yes, use the following to compute your timezone offset:
=====[Begin TZOffset QT]=====
%Calc='%-
%SETPATTREGEXP="(?im-s)%-
%-%-^Date\:.*?\s(\d{0,2})\:\d{0,2}\:\d{0,2}\s.*?([-+]\d{2})\d{2}"%-
%REGEXPBLINDMATCH="%HEADERS"%-
%OTIME="hh" - (%SUBPATT="1" - (%SUBPATT="2"))'%-
=====[ End TZOffset QT]=====
Then replace your EST with:
=====[Begin TZSelect QT]=====
%IF:"%QInclude='TZOffset'"="-5":"EST":"EDT"%-
=====[ End TZSelect QT]=====
The TZOffset QT seems to work on all sample messages here, but your
mileage may vary.
--
Thanks for writing,
Januk Aggarwal
I should probably engage that largish, grey organ lurking inside of
my skull a bit more often. I think it's called a brain.
-- Simon
________________________________________________________
Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html