Hi Daniel, You wrote:
> I decided to test TZOffset, by QINCLUDEing TZOffset in my original reply > template instead of QINCLUDEing TZSelect there. Sure enough, TZOffset > yielded "-29". After some thought, I realized that for a few hours each > day, GMT's day is Eastern (Standard/Daylight) Time's tomorrow. Since > midnight is 00 hours, 1 AM is 01 hours, ..., TZOffset yields a > difference that's off by 24 hours, during the time when GMT day is ahead > of Eastern (Standard/Daylight) Time. As a result, there are four (NOT > two) possible differences that TZOffset can yield: You forgot a case. See below. > Fortunately for me, TZSelect was just an IF, THEN, ELSE statement in > disguise <grin>, Yes, but your template needs a slight modification: =====[Begin TZSelect QT]===== %IF:"%QInclude='TZOffset'"="-5":"EST"%- %IF:"%QInclude='TZOffset'"="-4":"EDT"%- %IF:"%QInclude='TZOffset'"="-29":"EST"%- %IF:"%QInclude='TZOffset'"="-28":"EDT"%- %IF:"%QInclude='TZOffset'"="19":"EST"%- %IF:"%QInclude='TZOffset'"="20":"EDT"%- =====[End TZSelect QT]===== The case you forgot is when you're still on one day, but your correspondent is on the next day. Of course this case by case modification works, the only trouble is that it isn't general, ie it is only good for one timezone. The more general solution will take some more thought, but at least now you have a template that should work well for you. > Januk, thank you again for your help. Particularly, thank you for making > me think. I'm glad I could help. Januk Aggarwal ________________________________________________________ Current version is 1.61 | "Using TBTECH" information: http://www.silverstones.com/thebat/TBUDLInfo.html
