Improve time-related stuff
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Add created_at to all models Add modified_at to Session Get rid of custom now() function Make sure aware datetime is used everywhere
This commit is contained in:
@ -1,12 +1,5 @@
|
||||
import re
|
||||
from datetime import datetime, timedelta
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def now() -> datetime:
|
||||
return datetime.now(ZoneInfo(settings.TIME_ZONE))
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
def _safe_timedelta(duration: timedelta | int | None):
|
||||
|
Reference in New Issue
Block a user