#11227: tutorial #02 -
------------------------------------------------+---------------------------
Reporter: anon_who_is_annoyed_by_spam_filter | Owner: nobody
Status: new | Milestone:
Component: Documentation | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------------+---------------------------
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
Code part:
{{{
def was_published_today(self):
return self.pub_date.date() == datetime.date.today()
}}}
This baffled me for some time - after adding anything I got false. The
problem was with time zones - Django's settings.py had another time zone.
I would add a small comment in the documentation, or change
datetime.date.today() to some function which respects time zone in
settings.py.
--
Ticket URL: <http://code.djangoproject.com/ticket/11227>
Django <http://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---