Skip to content

Commit b5c9da9

Browse files
Fix time formatting
1 parent c7642b0 commit b5c9da9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SwiftSplit/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class ViewController: NSViewController, RouteBoxDelegate {
197197
let time = routeConfig.useFileTime ? info.fileTime : info.chapterTime
198198
let seconds = time.truncatingRemainder(dividingBy: 60)
199199
let minutes = Int(time / 60) % 60
200-
let hours = Int(time / 3600) % 60
200+
let hours = Int(time / 3600)
201201

202202
var timeString = ""
203203
if hours > 0 { timeString += "\(hours):" }
@@ -209,7 +209,7 @@ class ViewController: NSViewController, RouteBoxDelegate {
209209
}
210210
}
211211
if timeString != "" {
212-
timeString += String(format: "%02.3f", seconds)
212+
timeString += String(format: "%06.3f", seconds)
213213
} else {
214214
timeString += String(format: "%.3f", seconds)
215215
}

0 commit comments

Comments
 (0)