|
-
June 26th, 2008, 03:50 AM
#1
Time function
Dear All,
SetLocalTime API is working fine in Win Mobile 5.0.But SetSystemTime is giving a time diff of eight hours ahead.I am working on Win Mobile 5.0 SDK platform.
Please help....
-
June 26th, 2008, 07:57 AM
#2
Re: Time function
You need to offset the time for the TimeZone...
 Originally Posted by MSDN Online
SetSystemTime
This function sets the current system time and date. The system time is expressed in UTC.
 Originally Posted by MSDN Online
SetTimeZoneInformation
This function sets the current time-zone parameters. These parameters control translations from UTC to local time.
Remarks
SetTimeZoneInformation does not change the clock and therefore will not affect subsequent calls to GetLocalTime. SetTimeZoneInformation only affects subsequent calls to GetSystemTime.
SetTimeZoneInformation does not save the newly written data into the persistent registry. To write the data permanently, you need to make the following call: RegFlushKey(HKEY_LOCAL_MACHINE). For more information, see RegFlushKey.
All translations between UTC and local time are based on the following formula.
UTC = local time + bias
The bias is the difference, in minutes, between UTC and local time.
Hope this Helps....
Gremmy
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|