Created
April 8, 2015 03:25
-
-
Save tyaslab/57300ef43f996c908baf to your computer and use it in GitHub Desktop.
Django and Time Zone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fm1 = FakeModel.objects.create(name='Fake Name', event_date='2014-01-01 00:00:00') | |
then, in database, the event_date is '2013-12-31 17:00:00' | |
Django treats the date as current time zone, while SQL backend saves it as GMT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment