Fixed totals for 0 hours to not have minus sign.
[timetracker.git] / WEB-INF / lib / ttTimeHelper.class.php
index 3cef8b4..8142a26 100644 (file)
@@ -173,7 +173,7 @@ class ttTimeHelper {
   // minutesToDuration converts an integer number of minutes into duration string.
   // Formats returned HH:MM, HHH:MM, HH, or HHH.
   static function minutesToDuration($minutes, $abbreviate = false) {
-    $sign = $minutes > 0 ? '' : '-';
+    $sign = $minutes >= 0 ? '' : '-';
     $minutes = abs($minutes);
 
     $hours = (string) (int)($minutes / 60);