On Mon, 08 Nov 2021 22:39:38 +0100, Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
> [...] > |and work out the difference between g and l by checking the members > |(e.g. normalizing to either number of minutes) with something like: > | > | diff = (l->tm_sec-g->tm_sec)/60 > | +(l->tm_min-g->tm_min) > | +(l->tm_hour-g->tm_hour)*60 > | /* + compensate for day/month/year difference */ > | > |I'm happy to put some code together if you want. Or test a patch, > if you |prefer. > > That day-of-year / dateborder approach as is used by all other > MUAs was a great hint, thank you, Andrea! > Yes i did it like that as a fallback if tm_gmtoff is not > available, and from some testing it works fine. > > Thanks again for this report, and also the hint. > Let's see whether i can release this week. No problem, Steffen. I was looking into postfix sourcecode yesterday, for something else, and there's an elegant (and portable) solution right in mail_date.c (https://github.com/vdukhovni/postfix/blob/master/postfix/src/global/mail_date.c). For the record, I read somewhere on the icann mailing list archive that Morocco has the same problem (negative adjustments) re. Ramadan. Andrea.