How to change Date, independ from Winter and Summer ?

  • Thread starter Thread starter Benjamin
  • Start date Start date
B

Benjamin

Hi,

the user can change the time, in my program. I use:

<DllImport("coredll.dll")> _
Public Shared Function SetLocalTime(ByRef lpSystemTime As
SYSTEMTIME) As Int32
End Function

In the winter works fine, but in summer there a difference from 1
hour. How can i workaround the mistake? I dont want to look if we got
winter or summer. I only want to set the time, independen from the
date. And this the whole year.

Please Help!

thanks, Benjamin
 
SetLocalTime sets the time with the timezone / daylight savings applied. Use
SetSystemTime to set a UTC time without these adjustments. If you only want
to change the date read the current value from GetSystemTime first, then
just modify the fields to reflect the user specified date and call
SetSystemTime.

Peter
 
Back
Top