bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generating date/time stamps


From: Jean Louis
Subject: Generating date/time stamps
Date: Mon, 07 Jun 2021 14:55:53 +0300

The problem with programmatic usage of `mail' is that it will not
automatically generate the time stamp. That means if I am saving or
recording it into ~/Maildir/recipient@example.com the later review of
sent emails will show that emails without date appear first but should
appear last.

Problem can be solved by adding the date to headers. I do wish to tell
what is the time zone from where email has been sent. 

Do you think that following is good enough?

(defun rcd-timestamp-email ()
  "Return timestamp suitable for email."
  (format-time-string "%a, %e %B %Y %T %z" nil 'wall))

(format-time-string "%a, %e %B %Y %T %z" nil 'wall) ⇒ "Mon,  7 June 2021 
14:52:07 +0300"

Another problem is that locale could change it to other language, I
will have to fix it maybe to English locale in Emacs.

Reference:
https://datatracker.ietf.org/doc/html/rfc2822#section-3.3


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]