Re: time zone conversion

2012-01-24 Thread Michael Elkins

On Mon, Jan 23, 2012 at 08:56:01PM +0100, Sebastian Tramp wrote:

On Mon, Jan 23, 2012 at 01:32:33PM +, Paul wrote:


>I'm looking for a way to convert the date header to my local time
>zone in the mail detail view. I'm aware of the index format %D option
>but need this for the (internal) pager.
>
>Any ideas?

This is not fantastic, but it's worked for me:


Indeed, this works great. Now I only need to combine that with t-prot
but thats not a problem.


I've actually been thinking about this recently as well.  It's 
probably worth having support directly in the pager for rewriting 
the Date: field to your local timezome based on a configuration 
option.


Re: time zone conversion

2012-01-23 Thread Sebastian Tramp
On Mon, Jan 23, 2012 at 01:32:33PM +, Paul wrote:

> >I'm looking for a way to convert the date header to my local time
> >zone in the mail detail view. I'm aware of the index format %D option
> >but need this for the (internal) pager.
> >
> >Any ideas?
>
> This is not fantastic, but it's worked for me:

Indeed, this works great. Now I only need to combine that with t-prot
but thats not a problem.

ST

-- 
WebID: http://sebastian.tramp.name


Re: time zone conversion

2012-01-23 Thread Gary Johnson
On 2012-01-23, Sebastian Tramp wrote:
> Hi all,
> 
> I'm looking for a way to convert the date header to my local time zone
> in the mail detail view. I'm aware of the index format %D option but
> need this for the (internal) pager.
> 
> Any ideas?

Would displaying that in the 'pager_format' line work for you?

Regards,
Gary



Re: time zone conversion

2012-01-23 Thread Paul

On Monday, 23 January, 2012 at 08:21:17 GMT, Sebastian Tramp wrote:

I'm looking for a way to convert the date header to my local time zone
in the mail detail view. I'm aware of the index format %D option but
need this for the (internal) pager.

Any ideas?


This is not fantastic, but it's worked for me:

Create a new script, eg. mutt_date_filter.pl:

---

#!/usr/bin/env perl

use strict;
use warnings;

while (<>) {
s/\b(..., \d{1,2} ... \d{4} \d\d:\d\d:\d\d [+-]?\d{4})\b/my $d;chomp($d=`date -d 
"$1" +'%A, %d %B, %Y, %T %Z'`);$d/eg;
print $_;
}

---

It looks for a string format matching that regex, and passes it to the 'date' 
command, which outputs it in your local time zone. I also told it to reformat 
it according to my own taste.

In .muttrc:

set display_filter="mutt_date_filter.pl"

Make sure it's in your path.

--

.


Re: time zone conversion

2012-01-23 Thread P. Mazart
Hi,

Sebastian Tramp schrieb am 23.01.2012 09:21:17:
> I'm looking for a way to convert the date header to my local time zone
> in the mail detail view. I'm aware of the index format %D option but
> need this for the (internal) pager.

Just noticed myself having this problem, too.
Thanks! :-) 

The only thing I can think of yet is using display_filter with an own 
script that uses formail or similar …

P.M.


time zone conversion

2012-01-23 Thread Sebastian Tramp
Hi all,

I'm looking for a way to convert the date header to my local time zone
in the mail detail view. I'm aware of the index format %D option but
need this for the (internal) pager.

Any ideas?

Best regards

Sebastian Tramp

-- 
WebID: http://sebastian.tramp.name