I'm trying to use the dates QuerySet method but I am getting different values in the template:
view:
timecards = Timecard.objects.all()
dates = Timecard.objects.dates('date', 'day', order='DESC')
template:
{% for tc in timecards %}
{{ tc.date }}
{% endfor %}
Oct. 14, 2013
{% for d in dates %}
{{ d }}
{% endfor %}
Oct. 13, 2013, 5 p.m.
The documentation says dates is supposed to return a datetime.date object, so there should not be any time. So where does the 5 p.m. come from? Also I'm assuming the day difference is due to time zone which comes with time. So am I using the dates method correctly?
Thanks,
Chad