summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 12afe94..61fe542 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -827,6 +827,9 @@ class LoreMessage:
else:
# An email without a Date: field?
self.date = datetime.datetime.now()
+ # Force it to UTC if it's naive
+ if self.date.tzinfo is None:
+ self.date = self.date.replace(tzinfo=datetime.timezone.utc)
diffre = re.compile(r'^(---.*\n\+\+\+|GIT binary patch|diff --git \w/\S+ \w/\S+)', re.M | re.I)
diffstatre = re.compile(r'^\s*\d+ file.*\d+ (insertion|deletion)', re.M | re.I)