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 eryksun, hobarrera, martin.panter
Date 2017-02-06.06:59:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486364350.81.0.678616991183.issue29457@psf.upfronthosting.co.za>
In-reply-to
Content
As Martin said, you need to set the LC_TIME category using an empty string to use the locale LC_* environment variables. Python 3 sets LC_CTYPE at startup (on Unix platforms only), but LC_TIME is left in the initial C locale:

    >>> locale.setlocale(locale.LC_CTYPE, None)
    'en_DK.UTF-8'
    >>> locale.setlocale(locale.LC_TIME, None)
    'C'
    >>> time.strftime('%x')
    '02/06/17'

    >>> locale.setlocale(locale.LC_TIME, "")
    'en_DK.UTF-8'
    >>> time.strftime('%x')
    '2017-02-06'
History
Date User Action Args
2017-02-06 06:59:10eryksunsetrecipients: + eryksun, martin.panter, hobarrera
2017-02-06 06:59:10eryksunsetmessageid: <1486364350.81.0.678616991183.issue29457@psf.upfronthosting.co.za>
2017-02-06 06:59:10eryksunlinkissue29457 messages
2017-02-06 06:59:10eryksuncreate