From b00f02271176567d6ee6d08b1035e1000fde47ee Mon Sep 17 00:00:00 2001 From: aviupadhyayula Date: Fri, 4 Oct 2024 17:43:26 -0400 Subject: [PATCH] Add timezone to renewal period definition --- backend/pennclubs/settings/base.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/pennclubs/settings/base.py b/backend/pennclubs/settings/base.py index e20a245df..a235f47c8 100644 --- a/backend/pennclubs/settings/base.py +++ b/backend/pennclubs/settings/base.py @@ -10,10 +10,10 @@ https://docs.djangoproject.com/en/2.1/ref/settings/ """ -import datetime import os import dj_database_url +from django.utils import timezone # Build paths inside the project like this: os.path.join(BASE_DIR, ...) @@ -208,8 +208,12 @@ REAPPROVAL_QUEUE_OPEN = True # controls whether existing clubs can request reapproval NEW_APPROVAL_QUEUE_OPEN = True # controls whether new clubs can request approval RENEWAL_PERIOD = ( - datetime.date(datetime.date.today().year, 8, 1), - datetime.date(datetime.date.today().year, 9, 30), + timezone.datetime( + timezone.now().year, 8, 1, tzinfo=timezone.get_default_timezone() + ), + timezone.datetime( + timezone.now().year, 9, 30, tzinfo=timezone.get_default_timezone() + ), ) # defines renewal period for club visibility # File upload settings