Convert IANA timezones to Windows

The IANA timezones database is probably the most used standard to reference a timezone by name (a lot of libraries use it).

The problem comes when you need to use these timezones informations in a C# program: Windows timezones have different names and there’s no standard method to convert a IANA timezone to a Windows one.

Informations about the relation between IANA and Windows timezones  are accessible here:
http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml

Looking at the data is clear that you can convert from a IANA timezone to a Windows one, but a Windows timezone cannot be converted to a single IANA timezone. This is because Windows groups more than one timezone under the same name.

I made a test project to demonstrate how to convert timezones: just deserialize the data and look for the corresponding timezone.

You can download the test project here: IANATimezonesConverter.zip

 

2 thoughts on “Convert IANA timezones to Windows

  1. I really love your blog.. Excellent colors & theme.
    Did you build this amazing site yourself? Please reply back as I’m looking
    to create my own website and would like to know
    where you got this from or what the theme is named. Kudos!

Leave a Reply

Your email address will not be published. Required fields are marked *

*