This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients aseques, belopolsky, docs@python, eric.smith, eryksun, p-ganssle
Date 2019-09-20.03:05:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568948744.41.0.0127675188321.issue38228@roundup.psfhosted.org>
In-reply-to
Content
> 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
History
Date User Action Args
2019-09-20 03:05:44eryksunsetrecipients: + eryksun, belopolsky, eric.smith, docs@python, p-ganssle, aseques
2019-09-20 03:05:44eryksunsetmessageid: <1568948744.41.0.0127675188321.issue38228@roundup.psfhosted.org>
2019-09-20 03:05:44eryksunlinkissue38228 messages
2019-09-20 03:05:44eryksuncreate