so something i struggled with is pulling a list of time zones in .net 4 (C #) to populate a drop down list in the form. I know I can do this:
var TimeZoneList = TimeZoneInfo.GetSystemTimeZones();
which will receive a list of time zones in the TimeZoneInfo class, which has the "Id" property. However, the identifier is not a Microsoft time zone index.
For example, with Eastern time, โIdโ is simply โEastern Standard Time,โ where the internal index is โ35โ. (Other indexes are here: http://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx )
Is there a way to get these indices from TimeZoneInfo.GetSystemTimeZones () or is there some other method that I can call to find them? I know that I can just make a switch case or a bunch of if statements to check each identifier and match the index value, but I think there should be a better way.
Thanks!
Seril source share