All Forums
 Microsoft Windows CE
 General CE
 SetLocalTime loses one second ce3.0/Bitsyboard
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

wabtec4

59 Posts

Posted - 04 Aug 2005 :  00:41:15  Show Profile  Email Poster
Hi guys,

I have a strange problem with SetLocalTime in Windows CE 3.0:
Here is the C code:

SYSTEMTIME DateTime;
DateTime.wYear=2005;
DateTime.wMonth=8;
DateTime.wDay=3;
DateTime.wHour=1;
DateTime.wMinute=33;
DateTime.wSecond=55;

TIME_ZONE_INFORMATION TimeZone;
memset( &TimeZone, 0, sizeof( TIME_ZONE_INFORMATION ) );
TimeZone.Bias = -600; // 600 minutes, Sydney = UTC + 10 hours
SetTimeZoneInformation( (const TIME_ZONE_INFORMATION* )&TimeZone );

SetLocalTime( & DateTime );

GetLocalTime( &DateTime );

I got:2005-8-3 1:33:54
I expect: 2005-8-3 1:33:55
Where did the missing one second go? All function were finished correctly, I checked.
Any help? Thanks,
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000