views:

16

answers:

0

Hello all,

I have to convert UMC datetime into user-friendly form, based on time zone, encoded by a single number. This number is a member of CdoTimeZoneId enum ('Value' column here: http://msdn.microsoft.com/en-us/library/ms988620(EXCHG.65).aspx). As far as I understand, CdoTimeZoneId is a part of Exchange Server SDK, but my application is standalone and I'd like not to use an external dependency.

So, is there a simple way to get an instance of TimeZoneInfo class, based on CdoTimeZoneId?

I thought on creating a map [number -- TimeZoneInfo.Id], but it's too hard since MSDN contains cities in its description of CdoTimeZoneId, and TimeZoneInfo.Id has a form of "[State] Standard Time".

UPDATE. It is possible to use TimeZoneInfo.DisplayName as a hint for creating the map, since DisplayName contains cities too. But if there is a better way to convert...

Regards,