From f83f66a35337ae9bf82b75e0d99b935869fee33d Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 2 Aug 2018 11:19:44 +0200 Subject: [PATCH] Store datetime as naive UTC datetimes (no TZ info) in db, to avoid issues with SQLite --- server/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models.py b/server/models.py index e5dbc3b..bf1b4b6 100644 --- a/server/models.py +++ b/server/models.py @@ -41,7 +41,7 @@ class Report(BaseModel): lat = peewee.DoubleField() lng = peewee.DoubleField() datetime = peewee.DateTimeField( - default=lambda: arrow.utcnow().replace(microsecond=0).datetime + default=lambda: arrow.utcnow().replace(microsecond=0).naive ) expiration_datetime = peewee.DateTimeField(null=True) is_open = peewee.BooleanField(default=True)