0
votes

Is there a way to get a list of time zones available on a Windows Mobile 6 (or even better 6.5.3) device? I need information about the bias, the standard bias, the daylight bias and the shifting dates (as in TIME_ZONE_INFORMATION). Those are the things I already tried:

  • The registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Timezones defines some time zones in binary format (_REG_TZI_FORMAT). It seems that Windows stores only time zone updates there, so the list isn't complete.
  • The Windows API doesn't seem to provide a function to enumerate over all time zones.
  • I maybe could map the time zones on Windows Mobile to the ones in Windows 7, but there are a lot of differences and this seems to be an error-prone task to me (besides of the hughe effort).
  • The MSDN tells me that there's a Timezones.csv which ships with the Windows Mobile SDK, but I can't find it on my computer (neither in the 6.5 SDK folder nor in the 6.5.3 SDK folder).
2

2 Answers

1
votes

The OpenNETCF Windows CE library allows to list the time zones available on a Windows Mobile device. Sample code:

var col = new TimeZoneCollection();
col.Initialize();

foreach (var timeZone in col)
{
  string name = timeZone.DisplayName;
  // ...
}

Internally, the library p/invokes the citydb.dll to obtain the information.

1
votes

I think what you are looking for is the Noda Time library, a port of Joda Time.

It provides extensive information about time(zones).