2

Is there any timezone mapping method from c# to python?

for example, from c# timezone id to python timezone list

Community
  • 1
  • 1
Lion.k
  • 2,519
  • 8
  • 28
  • 43
  • possible duplicate of [How to translate between Windows and IANA time zones?](http://stackoverflow.com/questions/17348807/how-to-translate-between-windows-and-iana-time-zones) – jfs Dec 30 '14 at 06:10

1 Answers1

0

To convert MS Windows timezone names ("c# timezone") to tzdata/Olsen timezone names (pytz "python timezone list") you could use http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml file e.g., to autogenerate the mapping, you could use get_windows_info.py Python 3 script.

jfs
  • 399,953
  • 195
  • 994
  • 1,670
  • 1
    thx, I found similar answer. http://stackoverflow.com/questions/17348807/how-to-translate-between-windows-and-iana-time-zones but python script +1 – Lion.k Dec 30 '14 at 06:08
  • This answer seems to be obsolete - the links are not working anymore – Swantewit Sep 21 '22 at 05:36
  • 1
    windowsZones.xml is now located here: https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml – iamdave Nov 02 '22 at 10:19