How to change Date, independ from Winter and Summer ?

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
 
P

Peter Foot [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top