From 582f135054625f52aa08c4b52b30ee152c5aa282 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 3 Nov 2020 16:46:59 +0100 Subject: parse_iso_date as helper; replaced Crypt::Random with Crypt::URandom --- templates/headers/_display_headers.html.ep | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'templates/headers/_display_headers.html.ep') diff --git a/templates/headers/_display_headers.html.ep b/templates/headers/_display_headers.html.ep index 67e60b4..e7f9650 100644 --- a/templates/headers/_display_headers.html.ep +++ b/templates/headers/_display_headers.html.ep @@ -71,9 +71,8 @@ %= ucfirst($msg->{is_multipart} ? l('yes') : l('no')); - % sub d { qr/([[:digit:]]{$_[0]})/ } - % my ($year,$mon,$mday,$hour,$min,$sec) = $msg->{date} =~ m/@{[d(4).'-'.d(2).'-'.d(2).'T'.d(2).':'.d(2).':'.d(2).'Z']}/; - %= join('/', $mday, $mon, $year) . " $hour:$min"; + % my $date = parse_iso_date $msg->{date}; + %= join('/', $date->{mday}, $date->{month}, $date->{year}) . " $date->{hour}:$date->{min}"; %= $msg->{from}->[0]->{name} || $msg->{from}->[0]->{email}; @@ -91,4 +90,4 @@ % } - \ No newline at end of file + -- cgit v1.2.3