Dear Ed,

On Fri, Mar 30, 2012 at 05:23:38PM -0400, Ed Blackman wrote:
> On Fri, Mar 30, 2012 at 02:27:47PM -0500, Kumar Appaiah wrote:
> >Often, I wish to know the time at which someone wrote me an e-mail
> >converted to the local time zone. Since most of my contacts live in
> >another time zone, (and some use the time zone +0000 even though that
> >isn't where they live), I have to do some mental calculations which
> >I'd like to avoid sometimes.
> >
> >Currently, my workaround for this is to make Mutt unignore a header
> >called X-Date, and add a procmail recipe like this:
> 
> Your procmail recipe adds the date at the time the message is
> received.  Perhaps using "%(fmt)" in your index_format instead of
> the default "%{fmt}" would help you get the desired time format in
> the index.

I don't think so. For your message, my recipe:

:0 f:
* ^Date: *\/[^ ].*
| formail -a "X-Date: `date  +\"%a, %d %b %Y %H:%M:%S %z\" -d\"$MATCH\"`"

gives me this:

 Date: Fri, 30 Mar 2012 17:23:38 -0400
 X-Date: Fri, 30 Mar 2012 16:23:38 -0500

The reason is because $MATCH parses the Date: header in the e-mail,
and passes it to the date command. In other words:

# date  +"%a, %d %b %Y %H:%M:%S %z" -d"Fri, 30 Mar 2012 17:23:38 -0400"
Fri, 30 Mar 2012 16:23:38 -0500

It appears that that is the time you composed the e-mail?

> man muttrc and search for index_format to learn the difference
> between the two.  If you don't have an index_format set, the default
> is
> "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s".  Experiment with
> "%4C %Z %(%b %d) %-15.15L (%?l?%4l&%4c?) %s" instead.
> 
> I don't think there's a way to change it in the pager.

That's sad. Thanks for the suggestions, but I'll stick to the X-Date,
since the pager is what I am interested in. I will fiddle around with
the index format, though.

Thanks.

Kumar
-- 
Kumar Appaiah

Reply via email to