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-10-15 19:32:59 +0200
commit79fdfeb620c9b95ad44c34a22d5d661baa55bc92 (patch)
tree5ff848a9ff7ac9a89794a153a5b249d7aecdb678 /ishtar_common/management/commands/gdpr_clean.py
parentb596f92c7f96a3ee4cdcfd00b4f4ddb11d4e4711 (diff)
downloadIshtar-79fdfeb620c9b95ad44c34a22d5d661baa55bc92.tar.bz2
Ishtar-79fdfeb620c9b95ad44c34a22d5d661baa55bc92.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)