Hi Daniel,
It was foretold that on Monday, November 18, 2002 at 12:09 GMT -0500,
Daniel Grunberg [DG] would type:
DG> I think that if we calculate/read the message's GMT hour, we can only
DG> be off by 0 hours, + 24 hours, or -24 hours, because GMT is GMT no
DG> matter which side of the International Date Line the message was sent
DG> from.
Yes, that's correct. I've found a very general way to calculate your
offset using three QT's. (Unfortunately, I haven't included half hour
timezones).
The templates are:
=====[Begin TZOffSet QT]=====
%Calc=~%-
%-
%REM=" Extract Hour and GMT offset "%-
%-
%SETPATTREGEXP="(?im-s)^Date\:.*?\s(\d{0,2})\:\d{0,2}\:\d{0,2}\s.*?([-+]\d{2})\d{2}"%-
%REGEXPBLINDMATCH="%HEADERS"%-
%-
%REM=" Local hour - GMT hour "%-
%-
%OTIME="hh" - (%SUBPATT="1" - (%SUBPATT="2")) +%-
%-
%REM=" Correct for straddling days in the different zones "%-
%-
%If:"%QInclude=_DateDiff_"="-6":"1":"%-
%If:'%QInclude=_DateDiff_'='6':'-1':'%-
%QInclude=_DateDiff_'" * (-24) ~%-
=====[ End TZOffSet QT]=====
=====[Begin DateDiff QT]=====
%CALC=_%-
%-
%-%-%Comment="%-
%-%-
%-%-%-%-%SetPattRegExp='(?im-s)^Date:.*(Sun|Mon|Tue|Wed|Thu|Fri|Sat)'%-
%-%-%-%-%RegExpMatch='%Headers'"%-
%-%-
%-%-%QInclude="DOW-Num" - %-
%-%-
%-%-%Comment="%ODate='ddd'"%-
%-%-
%-%-%QInclude="DOW-Num"_%-
%-
%Comment=""%-
=====[ End DateDiff QT]=====
=====[Begin DOW-Num QT]=====
%IF:"%Comment"="Sun":"1"%-
%IF:"%Comment"="Mon":"2"%-
%IF:"%Comment"="Tue":"3"%-
%IF:"%Comment"="Wed":"4"%-
%IF:"%Comment"="Thu":"5"%-
%IF:"%Comment"="Fri":"6"%-
%IF:"%Comment"="Sat":"7"%-
=====[ End DOW-Num QT]=====
--
Thanks for writing,
Januk Aggarwal
I have a stepladder. It's a very nice stepladder, but it's sad that I
never knew my real ladder. -- Craig Charles
________________________________________________________
Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html