nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] date math

2014-12-15 11:23:23
Ken Hornstein <kenh(_at_)pobox(_dot_)com> writes:
So my wife's employer's hosted email system is set up in UTC.  Every
the email I get from her includes a header line such as

Date: Mon, 15 Dec 2014 16:27:12 +0000

It's probably outside the scope of NMH, but I was hoping there might
be a way to set up "show" or "mhl" to notice this and convert the Date
headerto either my (the recipient machine's) local time zone, or a
time zone specified in a config file.

You know ... I was wondering this myself.  Turns out there is!  I
realize that mh-format(5) can be a bit daunting, and my first effort
didn't work, but the answer isn't so bad.  The mh-format magic is:

%(date2local{date})%(pretty{date})

Well, that all depends on where you're using it.  The key line in the
default mhl.format is:

Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"

For this case, you'd want:

Date:formatfield="%<(nodate{text})%{text}%|%(date2local{text})%(pretty{text})%>"

Shouldn't that be the default?

    Norman Shapiro

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>