summaryrefslogtreecommitdiff
path: root/ishtar_common/management/commands/gdpr_clean.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-07-21 15:07:41 +0200
commiteda40f3481b6963163a04cc393db2bb95d3c5242 (patch)
treeb8d3c303ed1d7b9f0dd1a754784bddee7a7460f6 /ishtar_common/management/commands/gdpr_clean.py
parent8ecebddbbaccd5f859cf526c07468c6f921a17b9 (diff)
downloadIshtar-eda40f3481b6963163a04cc393db2bb95d3c5242.tar.bz2
Ishtar-eda40f3481b6963163a04cc393db2bb95d3c5242.zip
♻️ django: fix warnings for v5 - migrate to timezone aware dates
Diffstat (limited to 'ishtar_common/management/commands/gdpr_clean.py')
-rw-r--r--ishtar_common/management/commands/gdpr_clean.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/management/commands/gdpr_clean.py b/ishtar_common/management/commands/gdpr_clean.py
index 1f3f413f6..c53d24fcc 100644
--- a/ishtar_common/management/commands/gdpr_clean.py
+++ b/ishtar_common/management/commands/gdpr_clean.py
@@ -4,6 +4,7 @@
import datetime
from django.conf import settings
from django.core.management.base import BaseCommand
+from django.utils import timezone
import sys
from ishtar_common.models import GDPRLog, GDPRPerson
@@ -15,7 +16,7 @@ def get_time():
def clean_gdpr():
- date = datetime.datetime.now() - (
+ date = timezone.now() - (
datetime.timedelta(days=settings.GDPR_RETENTION_PERIOD)
)
q = GDPRLog.objects.filter(date__lte=date)