aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Utils.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perllib/Utils.pm b/perllib/Utils.pm
index 84c09d09d..7dd2a3f39 100644
--- a/perllib/Utils.pm
+++ b/perllib/Utils.pm
@@ -178,16 +178,17 @@ sub prettify_dt {
}
$tt .= ', ' unless $type eq 'date';
if ($dt->strftime('%Y %U') eq $now->strftime('%Y %U')) {
- $tt .= decode_utf8($dt->strftime('%A'));
+ $tt .= $dt->strftime('%A');
} elsif ($type eq 'zurich') {
- $tt .= decode_utf8($dt->strftime('%e. %B %Y'));
+ $tt .= $dt->strftime('%e. %B %Y');
} elsif ($type eq 'short') {
- $tt .= decode_utf8($dt->strftime('%e %b %Y'));
+ $tt .= $dt->strftime('%e %b %Y');
} elsif ($dt->strftime('%Y') eq $now->strftime('%Y')) {
- $tt .= decode_utf8($dt->strftime('%A %e %B %Y'));
+ $tt .= $dt->strftime('%A %e %B %Y');
} else {
- $tt .= decode_utf8($dt->strftime('%a %e %B %Y'));
+ $tt .= $dt->strftime('%a %e %B %Y');
}
+ $tt = decode_utf8($tt) if !utf8::is_utf8($tt);
return $tt;
}