diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-23 14:15:40 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-23 14:15:40 +0000 |
commit | 60ee7fe9699a71895d5a83c6010ef7acad784d00 (patch) | |
tree | 8a9bca84f6f37368f4df4399792d7715809367d4 | |
parent | 7f09cfd0f0254666e815ef87de0ce6f651a524b1 (diff) |
Unidecode strings back from strftime.
-rw-r--r-- | perllib/Page.pm | 8 | ||||
-rwxr-xr-x | web-admin/index.cgi | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 68a027e4b..2ce44f410 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -483,13 +483,13 @@ sub prettify_epoch { if (strftime('%Y%m%d', @s) eq strftime('%Y%m%d', @t)) { $tt = "$tt " . _('today'); } elsif (strftime('%Y %U', @s) eq strftime('%Y %U', @t)) { - $tt = "$tt, " . strftime('%A', @s); + $tt = "$tt, " . decode_utf8(strftime('%A', @s)); } elsif ($short) { - $tt = "$tt, " . strftime('%e %b %Y', @s); + $tt = "$tt, " . decode_utf8(strftime('%e %b %Y', @s)); } elsif (strftime('%Y', @s) eq strftime('%Y', @t)) { - $tt = "$tt, " . strftime('%A %e %B %Y', @s); + $tt = "$tt, " . decode_utf8(strftime('%A %e %B %Y', @s)); } else { - $tt = "$tt, " . strftime('%a %e %B %Y', @s); + $tt = "$tt, " . decode_utf8(strftime('%a %e %B %Y', @s)); } return $tt; } diff --git a/web-admin/index.cgi b/web-admin/index.cgi index 79727e806..b29c290da 100755 --- a/web-admin/index.cgi +++ b/web-admin/index.cgi @@ -818,13 +818,13 @@ sub admin_timeline { my $date = ''; my $cobrand_data; foreach (reverse sort keys %time) { - my $curdate = strftime('%A, %e %B %Y', localtime($_)); + my $curdate = decode_utf8(strftime('%A, %e %B %Y', localtime($_))); if ($date ne $curdate) { print '</dl>' if $date; print "<h2>$curdate</h2> <dl>"; $date = $curdate; } - print '<dt><b>', strftime('%H:%M:%S', localtime($_)), ':</b></dt> <dd>'; + print '<dt><b>', decode_utf8(strftime('%H:%M:%S', localtime($_))), ':</b></dt> <dd>'; foreach (@{$time{$_}}) { my $type = $_->{type}; my $name_str = '; ' . sprintf(_("by %s"), ent($_->{name})) . " <" . ent($_->{email}) . ">, '" . ent($_->{title}) . "'"; @@ -852,7 +852,7 @@ sub admin_timeline { my $param2 = $_->{parameter2} || ''; print sprintf(_("Alert %d created for %s, type %s, parameters %s / %s"), $_->{id}, ent($_->{email}), $_->{alert_type}, $param, $param2); } elsif ($type eq 'alertDel') { - my $sub = strftime('%H:%M:%S %e %B %Y', localtime($_->{whensubscribed})); + my $sub = decode_utf8(strftime('%H:%M:%S %e %B %Y', localtime($_->{whensubscribed}))); print sprintf(_("Alert %d disabled (created %s)"), $_->{id}, $sub); } print '<br>'; |