BeforeLocalization 578 Bytes
Newer Older
sunnavy's avatar
sunnavy committed
1
2
3
<%init>
for my $header ( @$headers ) {
    if ( $header->{Tag} eq 'Date' && $header->{Value} ) {
4
5
        $header->{Value} =~ s!^\s+!!;
        $header->{Value} =~ s!\s+$!!;
sunnavy's avatar
sunnavy committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
        my $date = RT::Date->new($session{CurrentUser});
        $date->Set(
            Format   => 'unknown',
            Value    => $header->{Value},
            Timezone => 'UTC',
        );

        if ( $date->Unix ) {
            $header->{Value} = $date->RFC2822(Timezone => 'user') . qq! <span style="color:grey">($header->{Value})</span>!;
        }
    }
}
</%init>

<%args>
$headers
</%args>