0

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).
Gene
  • 4,192
  • 5
  • 32
  • 56

2 Answers2

1

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.

Gene
  • 4,192
  • 5
  • 32
  • 56
1

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

It provides extensive information about time(zones).

Jaapjan
  • 3,365
  • 21
  • 25
  • Thank you for this hint. For some legacy reason I needed the list of Windows Mobile (which is sufficient for my use case, even if it hasn't been updated since 2009). In a new project I would use such a library as you suggested. – Gene Apr 19 '12 at 12:39