Monday, August 12, 2013

Getting Timezone conversion in template with USE_TZ = False;

I'm displaying a date/time field in template.

Data in the database: 2013-05-30 00:00:00
template tag:   {{ reg.registration_date  }}  
as displayed in the web page: May 29, 2013, 5 p.m.

I didn't have a USE_TZ setting until I tried to figure out what was happening here.

The data I'm playing with now was all migrated from another system directly to the backend, i.e., I didn't migrate through django.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment