diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 9d0d3d9c9b6..d80472d8776 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1421,7 +1421,7 @@ def skip_if_buggy_ucrt_strfptime(test): global _buggy_ucrt if _buggy_ucrt is None: if(sys.platform == 'win32' and - locale.getdefaultlocale()[1] == 'cp65001' and + locale.getpreferredencoding(False) == 'cp65001' and time.localtime().tm_zone == ''): _buggy_ucrt = True else: