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

asked 25 Jan '10, 16:55

Rolf's gravatar image

Rolf
16
accept rate: 0%

edited 22 Apr '10, 09:19

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310


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.

link

answered 25 Jan '10, 17:21

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3
×2

Asked: 25 Jan '10, 16:55

Seen: 496 times

Last updated: 22 Apr '10, 09:19