feat: datetime_now helper util

This commit is contained in:
relikd
2023-06-02 17:05:59 +02:00
parent 4cac963a5e
commit 7de6db0c8d
4 changed files with 33 additions and 7 deletions

8
app/base/forms/utils.py Normal file
View File

@@ -0,0 +1,8 @@
from django.utils import timezone
from datetime import timedelta
def datetime_now():
now = timezone.now()
return now - timedelta(microseconds=now.microsecond) # remove precision