From b1e76c8569ebf4894c4c2644df33df47f2b0a70d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Dec 2025 17:49:27 +0000 Subject: [PATCH] Fix IMAP since option date format to use RFC 3501 compliant DD-Mon-YYYY format Co-authored-by: seanthegeek <44679+seanthegeek@users.noreply.github.com> --- parsedmarc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 4160d70..aec3699 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1948,8 +1948,8 @@ def get_dmarc_reports_from_mailbox( "Only days and weeks values in 'since' option are \ considered for IMAP connections. Examples: 2d or 1w" ) - since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).date() - current_time = datetime.now(timezone.utc).date() + since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).strftime("%d-%b-%Y") + current_time = datetime.now(timezone.utc).strftime("%d-%b-%Y") elif isinstance(connection, MSGraphConnection): since = ( datetime.now(timezone.utc) - timedelta(minutes=_since)