Python 3 uses wcsftime() to format a timestamp and decodes tzname[0] and tzname[1] from UTF-8. The problem is that both methods format the quote differently: U+0092 for wcsftime("%Z") and U+2019 in tzname[1].
>>> time.strftime("%Z")
'Paris, Madrid (heure d\x92été)'
>>> time.tzname
('Paris, Madrid', 'Paris, Madrid (heure d\u2019été)')
======================================================================
ERROR: test_timezone (test.test_strptime.StrptimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\victor\cpython\lib\test\test_strptime.py", line 303, in test_timezone
strp_output = _strptime._strptime_time(strf_output, "%Z")
File "C:\victor\cpython\lib\_strptime.py", line 482, in _strptime_time
tt = _strptime(data_string, format)[0]
File "C:\victor\cpython\lib\_strptime.py", line 340, in _strptime
data_string[found.end():])
ValueError: unconverted data remains: (heure d\x92été)
======================================================================
FAIL: test_timezone (test.test_strptime.LocaleTime_Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\victor\cpython\lib\test\test_strptime.py", line 78, in test_timezone
(timezone, self.LT_ins.timezone))
AssertionError: False is not true : timezone paris, madrid (heure d\x92été) not
found in (frozenset({'utc', 'paris, madrid', 'gmt'}), frozenset({'paris, madrid
(heure d\u2019été)'}))
----------------------------------------------------------------------
|