~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH lists.sr.ht] Don't strip timezone information on import

Details
Message ID
<1z5E885Cm6tJaF4914GdnC25I_xh38mNou8-Hf1jn8Sz9Tyr6RceX2lZNKjjqmWQBaG4kUCDPNDzx2zYH4Gx8AkxLEsQo0KWwoMcRqQQ3uw=@emersion.fr>
DKIM signature
fail
Download raw message
Patch: +2 -2 DKIM signature: fail
datetime.replace discards the previous timezone. Instead, convert to UTC.

This fixes ordering of messages in a thread when each has a different
timezone.
---
 listssrht/process.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/listssrht/process.py b/listssrht/process.py
index 9bea37eba4d9..6ad9bacc5fdf 100644
--- a/listssrht/process.py
+++ b/listssrht/process.py
@@ -20,7 +20,7 @@ import re
import smtplib
import tempfile
from celery import Celery
from datetime import datetime
from datetime import datetime, timezone
from email.mime.text import MIMEText
from email.utils import parseaddr, getaddresses, formatdate, make_msgid
from email.utils import parsedate_to_datetime
@@ -590,7 +590,7 @@ def import_mbox(spool, list_id):
                date = parsedate_to_datetime(date)
                if not date:
                    continue
                date = date.replace(tzinfo=None)
                date = date.astimezone(timezone.utc)
                mail.created = date
                mail.updated = date
                db.session.commit()
-- 
2.28.0
Details
Message ID
<C5NBWN4OYSQ3.23Y72Y38DYOVT@homura>
In-Reply-To
<1z5E885Cm6tJaF4914GdnC25I_xh38mNou8-Hf1jn8Sz9Tyr6RceX2lZNKjjqmWQBaG4kUCDPNDzx2zYH4Gx8AkxLEsQo0KWwoMcRqQQ3uw=@emersion.fr> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/lists.sr.ht
   0cbabbd..f73352b  master -> master

[lists.sr.ht/patches] build failed

builds.sr.ht
Details
Message ID
<C5RJZFYHKFSH.39HFWOKAD1PHF@cirno2>
In-Reply-To
<1z5E885Cm6tJaF4914GdnC25I_xh38mNou8-Hf1jn8Sz9Tyr6RceX2lZNKjjqmWQBaG4kUCDPNDzx2zYH4Gx8AkxLEsQo0KWwoMcRqQQ3uw=@emersion.fr> (view parent)
DKIM signature
missing
Download raw message
lists.sr.ht/patches: FAILED in 18m52s

[Don't strip timezone information on import][0] from [Simon Ser][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/13919
[1]: mailto:contact@emersion.fr

✗ #304929 FAILED lists.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/304929
✗ #304931 FAILED lists.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/304931
✗ #304930 FAILED lists.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/304930
Reply to thread Export thread (mbox)