> Hello all, > > Some time ago I noticed some bug that's not critical. I want to share this with you. > > I live in Europe, timezone CES. That's important because it's involved in this bug, I think. The time difference is exactly my timezone shift, as far as I investigated. > > All mails I open via imap have this bug, but it's not the mails itself, it's the imap. It seems like mails are saved (via smtp) without the timezone applied¹, but when I open them imap (or upas?) seems to apply the timezone again, resulting in a future date. > > I should note that this bug appears not only with a local upas acme mail reader, but also with other imap clients on different platforms. That's why I think it's the imapd server, not the clients, and also not the saved mail messages (smtpd). > > To mention an example: I sent a mail from my smtp client to my server at 09:26 CES. The message is saved as 1596180390.00, which results in that exact time. My .idx file also has that exact timestamp. My IMAP clients (upasfs/acme as well as non-plan9) report a time from the future (11:26). > > Looking into upasfs directory for this mail and catting some files: > date: 07:27 UTC (correct, add two hours because of timezone) > unixdate: 11:26 CES (two hours in the future) > > My non-plan9 IMAP client reports: > Sent date: 09:49 CES (correct; equivalent to date file) > Recv date: 11:49 CES (two hours in the future, equivalent to unixdate file) > > I'll try investigating further and send patches if I can manage to fix this. > > sirjofri > > ——— > ¹ date mailstamp is correct with local time; stamp from /mail/box. First off -- to confirm, you're running with upas/imap4d, and upas/fs, as well as whatever other clients you use (eg, your phone) are reporting the wrong time? Can you try applying the rewrite of our date handling code and see if maybe I've accidentally fixed the issue? I've attached the most current version of that chaange so you dont' need to go hunt around for it. If that doesn't work, can you echo 'debug' into /mail/fs/ctl, and give some of the dates that are coming out of the imap server?