Set the right system date-time

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi all,

I'm using the SetSystemTime() to set the device date and time.
It seems there is a little problem with time-zone settings, so I ask how I
can set the time according with it.

Explanation: I have the time zone set to +1 (Rome), if I set 10:00 AM I see
on the device title bar 12:00...
1) Why I get it wrong by 2 and not by 1 hour?
2) How to set the right hour (10:00)?

Thanks!
 
SetSystemTime sets UTC(GMT) time. You get +1 (Rome) +1 (DST). 10AM GMT =
12PM European Daylight Time
You need to use GetTimeZoneInformation to convert between local time and UTC
 
SetSystemTime sets UTC(GMT) time. You get +1 (Rome) +1 (DST). 10AM GMT =
12PM European Daylight Time

Ha... DST (that stands for?) is +1... I thinked it was 0.

You need to use GetTimeZoneInformation to convert between local time and
UTC

I found the SetLocalTime() that seems to work fine.
Is it the right one?

Thanks again.
 
Back
Top