Message287086
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' |
|
Date |
User |
Action |
Args |
2017-02-06 06:59:10 | eryksun | set | recipients:
+ eryksun, martin.panter, hobarrera |
2017-02-06 06:59:10 | eryksun | set | messageid: <1486364350.81.0.678616991183.issue29457@psf.upfronthosting.co.za> |
2017-02-06 06:59:10 | eryksun | link | issue29457 messages |
2017-02-06 06:59:10 | eryksun | create | |
|