Eryk Sun <eryk...@gmail.com> added the comment:
> Have you tried this on Windows or macOS? 3.5+ in Windows uses ucrt, which quietly ignores 'E' and 'O' strftime modifiers. From ucrt\time\wcsftime.cpp: // Skip ISO E and O alternative representation format modifiers. We // do not support alternative formats in any locale. if (*format_it == L'E' || *format_it == L'O') { ++format_it; } Example: >>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') 'ca_ES.utf8' >>> time.strftime('%b|%Ob') 'set.|set.' 2.7 uses the old MSVC runtime, in which the 'E' and 'O' modifiers are invalid. Example: >>> locale.setlocale(locale.LC_ALL, 'cat_esp') 'Catalan_Spain.1252' >>> time.strftime('%b') 'set.' >>> time.strftime('%Ob') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Invalid format string ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38228> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com