Fix broken time formatting, remove word field

This commit is contained in:
stijndcl 2022-07-26 21:48:50 +02:00
parent cbd3030565
commit ea4181eac0
9 changed files with 22085 additions and 12 deletions

View file

@ -1,5 +1,14 @@
import datetime
import zoneinfo
__all__ = ["LOCAL_TIMEZONE"]
__all__ = ["LOCAL_TIMEZONE", "today_only_date"]
LOCAL_TIMEZONE = zoneinfo.ZoneInfo("Europe/Brussels")
def today_only_date() -> datetime.datetime:
"""Mongo can't handle datetime.date, so we need datetime
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)