We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c15143a + 5ba4d96 commit 93a59d1Copy full SHA for 93a59d1
edx_sga/utils.py
@@ -9,6 +9,7 @@
9
10
import pytz
11
from django.conf import settings
12
+from django.core.files.storage import FileSystemStorage
13
from django.core.files.storage import default_storage as django_default_storage
14
from django.core.files.storage import storages
15
from django.utils.module_loading import import_string
@@ -85,8 +86,7 @@ def get_file_modified_time_utc(file_path):
85
86
# time.tzname returns a 2 element tuple:
87
# (local non-DST timezone, e.g.: 'EST', local DST timezone, e.g.: 'EDT')
88
pytz.timezone(time.tzname[0])
- if settings.DEFAULT_FILE_STORAGE
89
- == "django.core.files.storage.FileSystemStorage"
+ if isinstance(default_storage, FileSystemStorage)
90
else pytz.utc
91
)
92
0 commit comments