| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Daylight Saving ? |
Hallo Marc,
MB> I am searching for a batch file to set the variable acording to the
MB> Daylight saving time. From the last sunday of march till the last sunday
MB> of October it should be set as SET TZUTX=+0200 otherwhise it should be
MB> TZUTC=+0100
Try these lines:
:: XDLT.BTM
:: This line looks for Januar 1st, next year.
set jan1next=%{at}date[01-01-%{at}eval[%_year + 1]]
:: These lines determine the last sunday in March
:: (end of wintertime)
set march31=%{at}eval[%jan1next-276]
set lsm=%{at}eval[%march31-%{at}dowi[%march31]+1]
:: These lines determine the last sunday in October
:: (end Of summertime)
set oct31=%{at}eval[%jan1next-62]
set lso=%{at}eval[%oct31-%{at}dowi[%oct31]+1]
:: This line sets variable to determine daylight
:: saving time on or off (Join at the ...)!
set TZUTX=%{at}if[%{at}date[%_date] ge %lsm .and. ...
...%{at}date[%_date] le %lso,+0200,+0100]
Be careful to rejoin the last long line. Housekeeping (unset unused vars
etc) should be added.
Have fun!
Ostrhauderfehn, 11. Dezember 1998, 8:03:22
*Klaus Meinhard*
--- WP/95 Rel 1.4 (190.0) Reg.
* Origin: Danger! Off-topic messages! Danger! (2:2449/236.1005)SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/50 252 @PATH: 2449/236 200 150 24/888 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.