2022-07-26 21:48:50 +02:00
|
|
|
import datetime
|
2022-07-23 20:35:42 +02:00
|
|
|
import zoneinfo
|
|
|
|
|
2022-07-26 21:48:50 +02:00
|
|
|
__all__ = ["LOCAL_TIMEZONE", "today_only_date"]
|
2022-07-23 20:35:42 +02:00
|
|
|
|
|
|
|
LOCAL_TIMEZONE = zoneinfo.ZoneInfo("Europe/Brussels")
|
2022-07-26 21:48:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
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)
|