The asyncpg driver does not seem to like offset-aware and offset-unaware
timestamps.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# Store Last-Modified
last_modified = headers.get("Last-Modified")
if last_modified:
- self.last_modified_at = email.utils.parsedate_to_datetime(last_modified)
+ # Parse the timestamp
+ t = email.utils.parsedate_to_datetime(last_modified)
+
+ # Store as UTC
+ self.last_modified_at = t.replace(tzinfo=None)
# Store the ETag
self.etag = headers.get("ETag")