feat: datetime_now helper util
This commit is contained in:
8
app/base/forms/utils.py
Normal file
8
app/base/forms/utils.py
Normal 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
|
||||
Reference in New Issue
Block a user