-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathblurb.txt
13 lines (8 loc) · 907 Bytes
/
blurb.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
Django, Postgres, Timezones, and You
Dealing with multiple time zones can be tricky and it is easy to run into problems if you are not careful. This talk explores some of the potiential pitfalls when working with timestamps in Django and Postgres and how to deal with them.
Consider the following code:
dt = datetime.datetime.now()
myobj = MyDjangoModel.objects.create(timestamp=dt)
myobj = MyDjangoModel.objects.get(pk=myobj.pk)
Would you expect that 'myobj.timestamp == dt'? With the default Django settings that is not guaranteed to be the case; come to this talk and find out why.
Dave Peticolas is a software engineer at Counsyl. Prior to that he was a software engineer at Lucasfilm for ten years. He has contributed to numerous open source projects including GnuCash and Twisted, and is the author of a popular introduction to Twisted and asynchronous programming at http://krondo.com.