Fix date encoding with call to date+iconv or fallback to strftime().

This commit is contained in:
Darold Gilles 2012-12-10 17:46:17 +01:00
parent 5beef120ee
commit 7b2d469609
1 changed files with 5 additions and 3 deletions

View File

@ -1094,7 +1094,9 @@ sub _print_header
{
my ($self, $fileout, $menu, $calendar) = @_;
my $now = strftime("%a %b %e %H:%M:%S %Y", localtime);
my $curdate = `date | iconv -t $Translate{CharSet} 2>/dev/null`;
chomp($curdate);
my $now = $curdate || strftime("%a %b %e %H:%M:%S %Y", localtime);
print $$fileout qq{
<!DOCTYPE html
@ -2613,11 +2615,11 @@ sub _print_top_domain_stat
print $out qq{
<tr>
<td>*.$_</td>
<td>$domain_stat{$_}{hits}</td>
<td>$domain_stat{$_}{hits}</span></td>
<td>$c_percent</td>
<td>$comma_bytes</td>
<td>$b_percent</td>
<td>$duration</td>
<td>$duration</span></td>
<td>$d_percent</td>
};
print $out qq{