Skip to content

Instantly share code, notes, and snippets.

@tyaslab
Created April 8, 2015 03:25
Show Gist options
  • Save tyaslab/57300ef43f996c908baf to your computer and use it in GitHub Desktop.
Save tyaslab/57300ef43f996c908baf to your computer and use it in GitHub Desktop.
Django and Time Zone
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