Title: The results of time.tzname print broken.
Type: behavior Stage:
Components: Windows Versions: Python 3.5, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: maxtortime, paul.moore, steve.dower, tim.golden, xtreak, zach.ware
Priority: normal Keywords:

Created on 2018-07-17 04:52 by maxtortime, last changed 2018-07-17 08:49 by xtreak.

Messages (2)
msg321790 - (view) Author: Taehwan Kim (maxtortime) Date: 2018-07-17 04:52
When I call time.tzname at Korean Windows. (Microsoft Windows 10 Pro(10.0.17134 Build 17134))

It prints like below. This problem occurred Python 2 and 3 both.
>>> import time
>>> time.tzname
('´ëÇѹα¹ Ç¥ÁؽÃ', '´ëÇѹα¹ Àϱ¤ Àý¾à ½Ã°£')

I used chardet for getting correct tzname.
>>> import chardet
>>> tzname = [tzn.encode('latin-1').decode('cp949') for tzn in time.tzname]
>>> tzname
['대한민국 표준시', '대한민국 일광 절약 시간']

I think that cause of this problem is tzname encoded by 'latin-1' at Window s.
msg321809 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-17 08:49
There is some discussion about this at and seems the issue is a related one.

Date User Action Args
2018-07-17 08:49:01xtreaksetnosy: + xtreak
messages: + msg321809
2018-07-17 04:52:03maxtortimecreate