Bläddra i källkod

Merge pull request #1401 from avrodrigues5/avr/fix-parsewindow

Bug fix: ParseWindow function parses window with timestamp to a location and not UTC time
Niko Kovacevic 3 år sedan
förälder
incheckning
0c2f063052
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      pkg/kubecost/window.go

+ 2 - 2
pkg/kubecost/window.go

@@ -278,8 +278,8 @@ func parseWindow(window string, now time.Time) (Window, error) {
 	if match != nil {
 		s, _ := strconv.ParseInt(match[1], 10, 64)
 		e, _ := strconv.ParseInt(match[2], 10, 64)
-		start := time.Unix(s, 0)
-		end := time.Unix(e, 0)
+		start := time.Unix(s, 0).UTC()
+		end := time.Unix(e, 0).UTC()
 		return NewWindow(&start, &end), nil
 	}