Skip to content

Commit

Permalink
Fix for zerologtime outputting wrong minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Oct 31, 2022
1 parent 64e06f9 commit 512115c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ui/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (t Logger) Msgf(format string, args ...interface{}) Logger {
var timetext string
if Zerotime {
elapsed := time.Since(starttime)
timetext = fmt.Sprintf("%02.0f:%02.0f:%02.0f.%03d", elapsed.Hours(), elapsed.Minutes(), elapsed.Seconds(), elapsed.Milliseconds()%1000)
timetext = fmt.Sprintf("%02d:%02d:%02d.%03d", int(elapsed.Hours()), int(elapsed.Minutes())%60, int(elapsed.Seconds())%60, elapsed.Milliseconds()%1000)
} else {
timetext = time.Now().Format("15:04:05.000")
}
Expand Down

0 comments on commit 512115c

Please sign in to comment.