On 2026-08-19 21:05:42 +0100, Ian Collier via Mutt-dev wrote:
> On Wed, Aug 19, 2026 at 08:36:49PM +0200, Vincent Lefevre wrote:
> > However, is it guaranteed to be less or equal to the time given
> > by CLOCK_REALTIME? This is not documented.
>
> I don't know if this counts as documentation:
> https://www.kernel.org/doc/html/latest/core-api/timekeeping.html#coarse-and-fast-ns-access
I meant by a standard, as Mutt needs to work on non-Linux systems
as well.
> > So I would say that the fix for Mutt would be
> >
> > void mutt_stamp_attachment(BODY *a)
> > {
> > - a->stamp = time(NULL);
> > + a->stamp = time(NULL) + 1;
> > }
> >
> > as suggested by Kevin.
>
> Agreed.
There could actually be a better solution: instead of calling time(),
why doesn't Mutt get the mtime of the file just after the editor
has terminated or just after Mutt has created the file (in case of
$edit_headers set)? IMHO, this would make more sense as the goal is
to compare the value with a future value of the mtime of this file.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)