Hello Arne. ..but on the list is better indeed.
Arne Wörner wrote in <OSOCBAPV.DLB4KZAA.RR7IQJ3M@FRLAPJEX.AX3QNOOX.5QK5J4ZQ>: |On 2022-07-28T17:15:02TAI, Steffen Nurpmeso wrote: |>|when I send an email with /bin/mail at 2022-07-28T04:48:54+00:00:37, |>|then s-mailx writes: |>|Date: Thu, 28 Jul 2022 04:48:54 +0000 |> |> And what did you expect? |> |exim would convert the timestamp to UTC and |write "Date: Thu, 28 Jul 2022 04:48:17 +0000"... Well .. i had to look, but i hardly can imagine that exim applies any special massage there. You normally use the standard functions gmtime(3) and localtime(3) for these things, or you link against a special library which does such, i *think* ICU offers data and time conversion too, but i only looked a little bit, and a decade has passed since. And localtime(3), on Linux, usually works according to /etc/localtime. |> What is it that i should fix? |> |I would find it cool, if s-mailx could detect that situation itself. |But of course I can use my wrapper script, too... |The question is, if s-mailx should mention, |that it cannot produce an RFC5322-compliant timestamp in the TAI zone. How should i detect this? We use the localtime(3) function for local time, and the gmtime(3) function for GMT. Doing this all on our own is a very hard thing to do, you need to be able to parse all forms of the $TZ environment variable, and you need to get a portable notion of where to get the zone name from otherwise (like readlink(2) /etc/localtime). Apart from that i personally am total opposed to dropping leap seconds and solar time. CLOCK_TAI for programming purposes ok, but a TAI time zone? I do not even own a watch. |> If it is that you want some standard to include CLOCK_TAI, oh yes, |> that i would love to see myself. Much better than fiddling around |> with the link of civil time to solar time. But CLOCK_TAI is not |> that widely supported, nor are the mechanisms in the kernel |> everywhere. :( |> |We do not need CLOCK_TAI... Better it would be. |I think my zoneinfo file makes fiddling around with 61-second long \ |minutes unnecessary, |because: There are no such minutes in TAI zone... So then. And exim fits that perfect environment? --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)