summaryrefslogtreecommitdiff
path: root/ishtar_common/management/commands/gdpr_clean.py
diff options
context:
space:
mode:
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)