Răsfoiți Sursa

Fixed bug in hour tracking - Formats hours to 2 digits correctly now, previously was only forcing to 2 digit times if there was a time offset configured. Fixes BugID#632883

sbingner 23 ani în urmă
părinte
comite
bfc5b239d1
2 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 3 0
      docs/Changelog
  2. 1 2
      modules/Pisg/Parser/Logfile.pm

+ 3 - 0
docs/Changelog

@@ -13,6 +13,9 @@ pisg (x.xx)
    * Only match emails if it begins at the beginning of a line or after
      something other than ':' URL on that line. Fixes BugID#618540
    * Strip DOS Formatting from files - Fixes space at end of line BugID#628580
+   * Fixed bug in hour tracking - Formats hours to 2 digits correctly now,
+     previously was only forcing to 2 digit times if there was a time offset
+     configured.  Fixes BugID#632883
 
 
 

+ 1 - 2
modules/Pisg/Parser/Logfile.pm

@@ -548,10 +548,9 @@ sub _adjusttimeoffset
         # Adjust time
         $hour += $self->{cfg}{timeoffset};
         $hour = $hour % 24;
-        $hour = sprintf('%02d', $hour);
     }
      
-    return $hour;
+    return sprintf('%02d', $hour);
 }
 
 1;