diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index cd89707155126a8cf0e74803e13743dd66ee80f6..202a598d8ae731854a4cd170170c9cb8686b4995 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -171,7 +171,7 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt
 
 	if ($format == 'all' || $format == 'allwithouthour' || $format == 'allhour' || $format == 'allhourmin')
 	{
-		if ($iSecond === 0) return '0';	// This is to avoid having 0 return a 12:00 AM for en_US
+		if ((int) $iSecond === 0) return '0';	// This is to avoid having 0 return a 12:00 AM for en_US
 
         $sTime='';
         $sDay=0;
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index e1da8444319f01d80069b2700a77bbf06eed8d98..74f9b122f1413482f1b8647af6143f85f82e68b3 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -816,7 +816,7 @@ if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['tota
         }
         elseif ($totalarray['totalplannedworkloadfield'] == $i) print '<td align="center">'.convertSecondToTime($totalarray['totalplannedworkload'],$plannedworkloadoutputformat).'</td>';
         elseif ($totalarray['totaldurationeffectivefield'] == $i) print '<td align="center">'.convertSecondToTime($totalarray['totaldurationeffective'],$timespentoutputformat).'</td>';
-        elseif ($totalarray['totalprogress_calculated'] == $i) print '<td align="center">'.($totalarray['totaldurationeffective'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>';
+        elseif ($totalarray['totalprogress_calculated'] == $i) print '<td align="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>';
         else print '<td></td>';
     }
     print '</tr>';