Преглед изворни кода

ensure /allocation response start and end are always in UTC format

Signed-off-by: saweber <saweber@gmail.com>
saweber пре 3 година
родитељ
комит
94eb56725e
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      pkg/kubecost/allocation_json.go

+ 2 - 2
pkg/kubecost/allocation_json.go

@@ -62,8 +62,8 @@ func (aj *AllocationJSON) BuildFromAllocation(a *Allocation) {
 	aj.Name = a.Name
 	aj.Properties = a.Properties
 	aj.Window = a.Window
-	aj.Start = a.Start.Format(time.RFC3339)
-	aj.End = a.End.Format(time.RFC3339)
+	aj.Start = a.Start.UTC().Format(time.RFC3339)
+	aj.End = a.End.UTC().Format(time.RFC3339)
 	aj.Minutes = formatFloat64ForResponse(a.Minutes())
 	aj.CPUCores = formatFloat64ForResponse(a.CPUCores())
 	aj.CPUCoreRequestAverage = formatFloat64ForResponse(a.CPUCoreRequestAverage)