RobThree / TimeZoneMapper

Library for mapping *N*X TimeZone ID's (e.g. Europe/Amsterdam) to .Net's TimeZoneInfo classes.
MIT License
18 stars 6 forks source link

Issue with GMT-[hours] zones #7

Closed minzdrav closed 8 years ago

minzdrav commented 8 years ago

Example:

    TimeZoneInfo tzi = TimeZoneMap.DefaultValuesTZMapper.MapTZID("Etc/GMT-11");
    Console.WriteLine(tzi.DisplayName);

Result:

(UTC+11:00) Solomon Is., New Caledonia

+11 instead -11.

RobThree commented 8 years ago

Can you explain why you think this is incorrect? This comes directly from the CLDR data from the Unicode consortium. (Do a CTRL-F on Etc/GMT- on the XML)

minzdrav commented 8 years ago

Hi @RobThree From your url: <mapZone other="Central Pacific Standard Time" territory="ZZ" type="Etc/GMT-11"/>

From https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx : "Central Pacific Standard Time" = (GMT+11:00) Magadan, Solomon Islands, New Caledonia

But how -11 can be equal +11? Here https://www.timeanddate.com/time/map/ -11 = +13. I'm confused now...

minzdrav commented 8 years ago

From CLDR data:

<!--  (UTC-11:00) Coordinated Universal Time-11  -->
<mapZone other="UTC-11" territory="001" type="Etc/GMT+11"/>

Etc/GMT+11 = UTC-11

And <mapZone other="Central Pacific Standard Time" territory="ZZ" type="Etc/GMT-11"/> Etc/GMT-11 = Central Pacific Standard Time = (GMT+11:00) Magadan, Solomon Islands, New Caledonia

I think something wrong, just not sure where.

minzdrav commented 8 years ago

I think nothing to do here. This is standard. Thank you.