Store datetime as naive UTC datetimes (no TZ info) in db, to avoid issues with SQLite
This commit is contained in:
parent
343143e8e7
commit
f83f66a353
@ -41,7 +41,7 @@ class Report(BaseModel):
|
|||||||
lat = peewee.DoubleField()
|
lat = peewee.DoubleField()
|
||||||
lng = peewee.DoubleField()
|
lng = peewee.DoubleField()
|
||||||
datetime = peewee.DateTimeField(
|
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)
|
expiration_datetime = peewee.DateTimeField(null=True)
|
||||||
is_open = peewee.BooleanField(default=True)
|
is_open = peewee.BooleanField(default=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user