January 1, 2005

WinTask - GetDaylightSaving

'
' GetDaylightSaving
'
' Author: Joe Strazzere
'

' Determines if the Operating Systems is currently in
' Daylight Saving Time mode or not
'
dim a as unsigned
dim ptr as unsigned
ptr=allocate(255)
PokeString(ptr," ",1)
a = External("kernel32","GetTimeZoneInformation",ptr)
Select Case a
case 1
  msgbox("We are operating in Standard Time",,"GetDaylightSaving")
case 2
  msgbox("We are operating in Daylight Saving Time",,"GetDaylightSaving")
case else
  msgbox("I just don't know!",,"GetDaylightSaving")
endselect