diff --git a/.isort.cfg b/.isort.cfg index 0ba42201c7302eac5be4f769721b0f91b08e6da7..f399f14b01902d7eb8656ec445d22192470a86f3 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -4,4 +4,4 @@ multi_line_output=3 include_trailing_comma=True lines_after_imports=2 not_skip=__init__.py -known_third_party = Crypto,apns2,jinja2,megabus,pytest,pywebpush,requests,sqlalchemy,stomp,yaml +known_third_party = Crypto,apns2,dateutil,jinja2,megabus,pytest,pywebpush,requests,sqlalchemy,stomp,yaml diff --git a/notifications_consumer/processors/email/processor.py b/notifications_consumer/processors/email/processor.py index d187748932148db0365b48804a9a380ebb02a302..1616e45e403c16b23719063330d95b4e21284446 100644 --- a/notifications_consumer/processors/email/processor.py +++ b/notifications_consumer/processors/email/processor.py @@ -36,7 +36,8 @@ class EmailProcessor(Processor): created_at = kwargs.get("created_at", "") try: - created_at = datetime.strptime(created_at, "%Y-%m-%dT%H:%M:%S.%fZ").strftime("%m/%d/%Y, %H:%M:%S") + created_at = datetime.strptime(created_at, "%m/%d/%Y, %H:%M:%S").strftime("%m/%d/%Y, %H:%M:%S") + except Exception: logging.exception("Failed to process created at date")