Re: Macro for time zone?
Tue, 13 Jan 2004 06:01:55 +1100 (2:01 PM EST Mon here) S J Love wrote: I was thinking it would be good to have an indication of time zone (TZ). eg where I am (New South Wales, Australia), the time zone (with daylight saving) is GMT + 1100. Of course message headers include indications of time zone... I posted a template for my time zone at http://www.silverstones.com/thebat/Library.html#activetimezone . Terry L Fritts and Januk Aggarwal showed me the way in recent posts on TBtech. They suggested downloading a plug-in from http://en.barin.com.ua/soft/mymacros/ , unzipping the downloaded file, and adding the mymacros.tbp to TheBat! as follows: TheBat! | Options | Preferences | Plug-ins | Add On my system (and probably on yours), once the mymacros plug-in has been added, using %RegRead(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias) in a template returns the number of minutes by which UTC differs from my computer's time of day. Where I live, the time is either: EST [GMT-0500], when GMT is 5 hours, i.e. 300 minutes, ahead of my system time. or EDT [GMT-0400], when GMT is 4 hours, i.e. 240 minutes, ahead of my system time. Since ActiveTimeZone is one of my Quick Templates, using %QINCLUDEActiveTimeZone in a template returns my seasonally adjusted time zone. You need to change my numbers of minutes (two places, each surrounded by quotes) and my time zone abbreviations (two places, each surrounded by quotes) appropriately, to make ActiveTimeZone work on your system. ActiveTimeZone %- %IF(%RegRead(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias)=300,EST)%- %- %IF(%RegRead(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias)=240,EDT)%- %- End QT Using: The Bat! v2.02.3 CE Windows 2000 v5.0 - Build 2195 - Service Pack 4 -- Daniel A. Grunberg Kensington, Maryland, USA homepage: www.nyx.net/~dgrunber/ Current version is 2.02.3 CE | Using TBUDL information: http://www.silverstones.com/thebat/TBUDLInfo.html
SOT: Re: Macro for time zone?
Tuesday, January 13, 2004, 8:01:55 AM, you wrote: SJL (The default in new mail and replies in Pocomail is, I think, SJL day-date-time + TZ.) (BTW, there is supposed to be some subtle SJL difference between GMT and UT...what the hell is it? In message SJL headers, is the reference to GMT or UT?) UT is more correctly referred to as UTC (Universally Coordinated Time). It's difference from GMT is academic for most as it is never more than a second. There's a pretty good explanation here: http://www.apparent-wind.com/gmt-explained.html Note I also found some sources which claimed that UTC was simply the 'new' version of GMT. Not so. -- Best regards, Allister Current version is 2.02.3 CE | Using TBUDL information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: SOT: Re: Macro for time zone?
Allister, On Monday, January 12, 2004, Allister Jenks wrote in mid:[EMAIL PROTECTED]: There's a pretty good explanation here: http://www.apparent-wind.com/gmt-explained.html Great reference! Thanks for putting it on the list. -- JN Current version is 2.02.3 CE | Using TBUDL information: http://www.silverstones.com/thebat/TBUDLInfo.html
Macro for time zone?
Dear Bat Persons, I looked at the Help File re time/date macros but could not see the answer for this one. In my templates for New messages, the time macro is %TIME, and in the replies template, the time macro is %OTimeLongEn. I think these are the defaults. I recently changed the macro in 'Replies' to %OTime. However, I was thinking it would be good to have an indication of time zone (TZ). eg where I am (New South Wales, Australia), the time zone (with daylight saving) is GMT + 1100. Of course message headers include indications of time zone... (The default in new mail and replies in Pocomail is, I think, day-date-time + TZ.) (BTW, there is supposed to be some subtle difference between GMT and UT...what the hell is it? In message headers, is the reference to GMT or UT?) I could not find out how to automatically include an indication of TZ (it would be good if it was automatic for when daylight saving ends here)...but ended up 'manually' adding the time zone (+ 1100) to my New message and Reply message templates...ie %TIME + 1100, and %OTimeLongEn + 1100, respectively. Help please. Ta muchly -- Kind regards, Steve ARMIDALE NSW AUSTRALIA Tuesday, 13 January 2004 05:48 + 1100 Mailer: The Bat! v2.01.3 Current version is 2.02.3 CE | Using TBUDL information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Macro for time zone?
Hi S, on Tue, 13 Jan 2004 06:01:55 +1100GMT (12.01.04, 20:01 +0100GMT here), you wrote in mid:[EMAIL PROTECTED] : SJL I looked at the Help File re time/date macros but could not see the SJL answer for this one. You need regular expressions for this in The Bat!. Here is the one I use to produce the above text: on%SETPATTREGEXP=(?m-s)on%SETPATTREGEXP=(?m-s)^Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}\:[\d]{0,2})\s*?(.*))%REGEXPMATCH=%HEADERSGMT (%ODATESHORT, %OTIME +0100GMT here), you wrote in mid:%SETPATTREGEXP=;(.*)%REGEXPMATCH=%OMSGID : %CURSOR Adjust it to your needs and insert it in your template. -- Cheers Peter Help Microsoft stamp out piracy - give Linux to a friend today. Current version is 2.02.3 CE | Using TBUDL information: http://www.silverstones.com/thebat/TBUDLInfo.html