New submission from Hugo Osvaldo Barrera: As the the posix spec for strftime:
%c The preferred date and time representation for the current locale. %x The preferred date representation for the current locale without the time. However, python doesn't seem to respect this: $ python3.5 -c "from datetime import datetime; print(datetime.now().strftime('%x'))" 02/06/17 $ date +%x # This one is right: 2017-02-06 $ echo $LC_TIME en_DK.UTF-8 * The same applies for '%c'. * The same applies for other python versions. * The same applies regardless of LC_TIME and LANG. * The same applies to time.strftime() * I tried a few different LC_TIME values, with the same result every time. ---------- components: Extension Modules messages: 287082 nosy: hobarrera priority: normal severity: normal status: open title: strftime('%x') does not use my locale type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29457> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com