Skip to content

Commit

Permalink
Don't error if we can't detect the timezone with new tzlocal error.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Aug 5, 2024
1 parent af7b8e7 commit fea4e9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kolibri/deployment/default/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from django.conf import locale
from morango.constants import settings as morango_settings
from tzlocal import get_localzone
from tzlocal.utils import ZoneInfoNotFoundError

import kolibri
from kolibri.deployment.default.cache import CACHES
Expand Down Expand Up @@ -309,7 +310,7 @@

try:
TIME_ZONE = get_localzone().zone
except (pytz.UnknownTimeZoneError, ValueError):
except (pytz.UnknownTimeZoneError, ValueError, ZoneInfoNotFoundError):
# Do not fail at this point because a timezone was not
# detected.
TIME_ZONE = pytz.utc.zone
Expand Down

0 comments on commit fea4e9a

Please sign in to comment.