summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-03-27 14:47:12 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-06-13 18:08:06 +0200
commit84ed3cfb40a64e64ddc32cc0df943cb12e198717 (patch)
treed4220a3a19ee6ae31fbf281d7e0d35fb5b452cd1 /ishtar_common/forms.py
parentdb174e7f376a3687cb6cd84339592231ceae0ee0 (diff)
downloadIshtar-84ed3cfb40a64e64ddc32cc0df943cb12e198717.tar.bz2
Ishtar-84ed3cfb40a64e64ddc32cc0df943cb12e198717.zip
♻️ django: fix warnings for v5 - migrate to timezone aware dates
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index 55feef714..d6f622fc0 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -35,7 +35,7 @@ from django.core.exceptions import ValidationError
from django.core import validators
from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME
from django.urls import reverse
-from django.utils import formats, translation
+from django.utils import formats, translation, timezone
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from django.utils.text import slugify
@@ -1173,7 +1173,7 @@ class DocumentItemSelect(ImportSelect):
def get_now():
- return datetime.datetime.now().strftime(formats.get_format("DATE_INPUT_FORMATS")[0])
+ return timezone.now().strftime(formats.get_format("DATE_INPUT_FORMATS")[0])
class ClosingDateFormSelection(IshtarForm):