0 votes
by (120 points)

I have the ntp time package. How can I set the zime zone on a wince 5.0 device to GMT in VB?

Applies to: Rebex Time

1 Answer

+1 vote
by (13.0k points)

The NTP protocol does not deal with time zones at all. This is why the current version of Rebex Time component includes no such functionality as well.

Fortunatelly settings of time zone should be quite easy.

  • you can call SetTimeZoneInformation via P/Invoke
  • you may set the [HKLM\Time\TimeZoneInformation][3] registry key

Please note that .NET CF loads the TimeZoneInformation into the AppDomain during creation. You may need to restart your app after setting the time zone. For details see P/Invoking SetTimezoneInformation() causes DateTime.Now to return an incorrect local time

If you need an actual VB.NET code for P/Invoking SetTimeZoneInformation please let me know by adding a comment to this answer.