Opened 12 years ago

Closed 12 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:


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/ (three times),
contrib/admin/templatetags/ (twice),
core/meta/ (six times),
core/meta/ (once),
middleware/ (once),
middleware/ (once),
utils/ (twice),
utils/ (twice),
views/generic/ (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 12 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Please reopen with more specific to-dos.

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