correct time loc

This commit is contained in:
mr
2026-03-20 14:01:14 +01:00
parent f1a9214ac7
commit 5619010838
2 changed files with 2 additions and 9 deletions

View File

@@ -33,14 +33,7 @@ func GetPlannerLongestTime(end *time.Time, planned map[tools.DataType]map[string
}
longestTime := float64(0)
for _, priced := range planned[tools.PROCESSING_RESOURCE] {
if priced.GetLocationEnd() == nil {
continue
}
newS := priced.GetLocationEnd()
if end == nil && longestTime < newS.Sub(*end).Seconds() {
longestTime = newS.Sub(*end).Seconds()
}
// get the nearest start from start var
longestTime += priced.GetExplicitDurationInS()
}
return longestTime
}