[docs] datetime - add remark for default Python locale != OS locale

Ward Van Heddeghem wvanheddeghem at hotmail.com
Mon Aug 9 11:11:10 CEST 2010


  Hello,

I have a suggestion for the "strftime() and strptime() behaviour 
<http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior>" 
section in the documentation:

I believe it would be informative to *provide a remark that the default 
Python locale is /by default/ not the default OS locale*, with a link to 
e.g. the setlocale() 
<http://docs.python.org/library/locale.html#locale.setlocale> function 
where it is explained how to use the default OS locale.

I find this non-obvious, since descriptions such as "Locale's 
appropriate date representation" (for the %x directive) would make me 
assume that, without any action from my part,  the locale's appropriate 
date representation is the one from the OS.
This made me submit this stackoverflow question:
http://stackoverflow.com/questions/3438120/python-date-formatted-with-x-locale-is-not-as-expected/3438292#3438292

best regards,
Ward van Heddeghem
Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20100809/85c5683b/attachment.html>


More information about the docs mailing list