[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: adapting scan.default to show local TZ date
From: |
Ken Hornstein |
Subject: |
Re: adapting scan.default to show local TZ date |
Date: |
Sat, 28 Dec 2019 13:33:50 -0500 |
>In the last few years, I see more email that has no local
>timezone, as in
>
> Sat, 28 Dec 2019 13:59:24 +0000
>
>Please give an example of a 'scan' format file that converts
>dates to my local time zone.
We actually had a huge discussion about this a few years ago, and you
can find the details here with a number of examples (the huge discussion
was about whether or not it should be the default).
https://lists.nongnu.org/archive/html/nmh-workers/2014-12/msg00065.html
But the executive summary is "use %(datetolocal{date}) before outputting
the date". Here's the default scan format with that change (admittedly, since
the default scan format only outputs the day and not the time, it doesn't
change much):
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%(date2local{date})%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>
We should probably include a scan format in the distribution that includes
a call to date2local as an example.
--Ken