#18932: Buildin template tags seem to break i18n -------------------------------+-------------------- Reporter: houmie | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 1.4 Severity: Normal | Keywords: i18n Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------+-------------------- Within my template as long as I have the following, the template automatically converts the datetime from UTC into my currently selected timezone. And I can also switch to a different culture (US to UK format) and the date and time format do change accordingly.
{{{ {% load l10n %} {% for item in calls %} <td>{{ item.conversation_datetime }}</td> <td>{{ item.conversation_datetime }}</td> {% endfor %} }}} Now all I need to do is to extract the localized date for the former and localized time for the latter. So I thought lets bang a template tag in there and life is good. {{{ {% load l10n %} {% for item in calls %} <td>{{ item.conversation_datetime|date }}</td> <td>{{ item.conversation_datetime|time }}</td> {% endfor %} }}} But if life was good, I wouldn't be sitting here and writing this would I? ;) The moment these filters are set, the format for these two fields seems to be fixed to the US culture. Date format is mm/dd/yyyy and time is 12 hrs am/pm. Selecting the British language as I did before successfully has no longer any effect. Please see a demo attached to this ticket. -- Ticket URL: <https://code.djangoproject.com/ticket/18932> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.