On Wed, Aug 05, 2026 at 11:33:18PM +0200, Steffen Nurpmeso via tz wrote:

> Depends on which mailx you mean, ewige Blumenkraft.
> Your code is from Heirloom mailx, which is unmainted since 2008.

Yes. Is it really dead? If so, that's unfortunate. Anyway, I've sent an
email to their devel list with a patch, and I've opened one up inside Red
Hat since we still ship Heirloom-mailx.

Here's the patch, for kicks, based on what they were saying in the Debian
bug about just using tm_gmtoff. (Which I now see is what you were
referencing in your code snippet at the end.)

$ cat mailx-sendout-tzdiff.patch
diff -ru a/sendout.c b/sendout.c
--- a/sendout.c 2026-08-05 13:23:23.746830743 -0700
+++ b/sendout.c 2026-08-05 13:24:26.180943233 -0700
@@ -1149,13 +1149,11 @@
        int tzdiff, tzdiff_hour, tzdiff_min;

        time(&t);
-       tzdiff = t - mktime(gmtime(&t));
+       tmptr = localtime(&t);
+       tzdiff = tmptr->tm_gmtoff;
        tzdiff_hour = (int)(tzdiff / 60);
        tzdiff_min = tzdiff_hour % 60;
        tzdiff_hour /= 60;
-       tmptr = localtime(&t);
-       if (tmptr->tm_isdst > 0)
-               tzdiff_hour++;
        return fprintf(fo, "%s: %s, %02d %s %04d %02d:%02d:%02d %+05d\n",
                        field,
                        weekday_names[tmptr->tm_wday],


> Must be said we have a drought here in Germany (where i live), and never
> in my life i encountered so few insects as this year.

Insects have been dying off in great number for a couple decades now, for a
variety of reasons. It's really bad news for us if we can't fix that.
Convincing politicians to change is not nearly as critical as convincing
our neighbors that we're in a really fragile place. I hope my kids aren't
among the last generation of humans because we've implemented our instance
of the Great Filter:

    https://en.wikipedia.org/wiki/Great_Filter


> P.S.:
> 
> s32
> mx_time_tzdiff(s64 secsepoch, struct tm const *utcp_or_nil, struct tm const 
> *localp_or_nil){
...
>         if(secsepoch < 0)
>                 secsepoch = 0;
>         else if(utcp_or_nil == NIL || localp_or_nil == NIL){

Mm. I learn something every day. I didn't realize the copy of a parameter
passed in by value was free to be manipulated. But sure enough.

-- 
Mason Loring Bliss - [email protected] - "We seek for slumbering trout /
  And whispering in their ears / Give them unquiet dreams;" - W.B. Yeats

Attachment: signature.asc
Description: PGP signature

Reply via email to