I have a small problem but cannot figure out why. On my django shell:
In [2]: Post.objects.dates('created', 'month')
Out[2]: [datetime.datetime(2012, 5, 1, 0, 0, tzinfo=<UTC>)]
but on my template,
{% for d in dates %}
<li><a href="#">{{ d|date:"m Y"}}</a></li>
{% endfor %}
which gives “04 2012” instead of “05 2012”. Did I miss something ?
Time zone difference. The date is midnight on 5/1/2012, so if your server is behind GMT, it’s only 4/30/2012.