correct time loc
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func (abs *PricedResource[T]) GetExplicitDurationInS() float64 {
|
||||
}
|
||||
if abs.BookingConfiguration.ExplicitBookingDurationS == 0 {
|
||||
if abs.BookingConfiguration.UsageEnd == nil && abs.BookingConfiguration.UsageStart == nil {
|
||||
return (1 * time.Hour).Seconds()
|
||||
return (5 * time.Minute).Seconds()
|
||||
}
|
||||
if abs.BookingConfiguration.UsageEnd == nil {
|
||||
add := abs.BookingConfiguration.UsageStart.Add(5 * time.Minute)
|
||||
|
||||
Reference in New Issue
Block a user