Closed GusSand closed 9 years ago
In general, the conversion only works with IDs, which should always be in English. The names that are output can be localized by language, but I wouldn't recommend going the other direction. There are too many ambiguities.
As an example, consider that "Central European Time", is the English display name of many zones, including Europe/Paris
, Europe/Stockholm
, and others.
The Windows TimeZoneInfo.Id
and TimeZoneInfo.StandardName
sometimes line up, but they are not the same thing.
If memory serves me correctly Id
might not be available on Windows Phone. (I know it wasn't in Silverlight).
You might consider using Noda Time on your Windows Phone app, since it's portable.
I have a requirement where my server expects Iana Timezones and Windows Phone (in this case) has the Windows TimezoneInfo name. I tried making the ConvertWindowsToIana public, but that doesn't work. I want this to work even in non enlish languages. I believe this library should already have all the date to do the lookup, but it only seems to work in English. Here are a couple of tests I have:
However if I have the spanish version, it fails:
same thing in french. Any suggestions ?
thanks G