1

I receive quite a few email messages displaying UTC time within the "Date:" header. I found the following perl script by user hyperair, very useful to display a new header "Local-Date" for incoming messages:

How do I configure mutt to display the date header in my local time zone in the pager?

However when replying I still have to fix manually the time displayed on the attribution line.

How can one set up the variable "attribution" to use the time used in the new header "Local-Date"?

(below I have copied the perl script which I use with as "display_filter")


#!/usr/bin/perl -n

use Date::Parse;
use POSIX;
use strict;

if (/^Date: /) {
    my $datestr = substr ($_, length ("Date: "));
    my $date = strftime ("%a, %d %b %Y %H:%m:%S",
                         localtime (str2time ($datestr)));
    print "Local-Date: $date\n";
}

print;
2

I think setting

set attribution="On %[!%e %b at %H:%M ], %n <%a> wrote:"

will suffice to display the local time on the attribution line, usually inserted at the beginning of the quoted text of a reply.

I have actually imitated the format used by user viric for the variable 'pager_format' in How do I configure mutt to display the date header in my local time zone in the pager?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.