Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Update parsers.py and test_consumer.py

Simon Siebert54cbacf4f46c
diff --git a/src/documents/parsers.py b/src/documents/parsers.py
index 80553cf7e..cb70f4fc6 100644
--- a/src/documents/parsers.py
+++ b/src/documents/parsers.py
@@ -224,6 +224,7 @@ def parse_date(filename, text):
"DATE_ORDER": date_order,
"PREFER_DAY_OF_MONTH": "first",
"RETURN_AS_TIMEZONE_AWARE": True,
+ "TIMEZONE": settings.TIME_ZONE,
},
)
diff --git a/src/documents/tests/test_consumer.py b/src/documents/tests/test_consumer.py
index 7225a7eef..ae70d4bd5 100644
--- a/src/documents/tests/test_consumer.py
+++ b/src/documents/tests/test_consumer.py
@@ -341,6 +341,8 @@ class TestConsumer(DirectoriesMixin, TestCase):
self._assert_first_last_send_progress()
+ self.assertEqual(document.created.tzinfo.zone, 'America/Chicago')
+
@override_settings(PAPERLESS_FILENAME_FORMAT=None)
def testDeleteMacFiles(self):
# https://github.com/jonaswinkler/paperless-ng/discussions/1037