Datetime formatters should be replaced to use django's own translation
|Reported by:||TT||Owned by:||hugo|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In Django's code there is many times called Python's datetime formatter strftime(), which uses server's locale settings to format datetimes. This leads to misformatted datetimes in some situations like Admin's date hierarchy feature.
So if locale settings can not be assigned request based settings, the usage of strftime should be minimized.
I grepped out following files, where this function is used:
contrib/admin/filterspecs.py (three times), contrib/admin/templatetags/admin_list.py (twice), core/meta/fields.py (six times), core/meta/__init__.py (once), middleware/http.py (once), middleware/sessions.py (once), utils/cache.py (twice), utils/feedgenerator.py (twice), views/generic/date_based.py (once)
I'm not sure if it isn't necessary to replace all those calls, but I listed them anyway.