Opened 9 years ago

Closed 9 years ago

#1345 closed enhancement (invalid)

Datetime formatters should be replaced to use django's own translation

Reported by: TT Owned by: hugo
Component: Translations Version: 0.91
Severity: normal Keywords: translation, datetime
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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.

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

Please reopen with more specific to-dos.

Note: See TracTickets for help on using tickets.
Back to Top