First tests for game stats

This commit is contained in:
stijndcl 2022-07-30 18:27:58 +02:00
parent bf41acd9f4
commit b74f794639
5 changed files with 64 additions and 7 deletions

View file

@ -7,8 +7,9 @@ LOCAL_TIMEZONE = zoneinfo.ZoneInfo("Europe/Brussels")
def today_only_date() -> datetime.datetime:
"""Mongo can't handle datetime.date, so we need datetime
"""Mongo can't handle datetime.date, so we need a datetime instance
We do, however, only care about the date, so remove all the rest
"""
return datetime.datetime.today().replace(hour=0, minute=0, second=0, microsecond=0)
today = datetime.date.today()
return datetime.datetime(year=today.year, month=today.month, day=today.day)