From 54cbacf4f46ceeb79cd99d088cf0704ac5e105ea Mon Sep 17 00:00:00 2001 From: Simon Siebert Date: Thu, 10 Mar 2022 13:27:40 +0100 Subject: [PATCH] Update parsers.py and test_consumer.py --- src/documents/parsers.py | 1 + src/documents/tests/test_consumer.py | 2 ++ 2 files changed, 3 insertions(+) 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