Просмотр исходного кода

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 лет назад
Родитель
Сommit
0c2f063052
1 измененных файлов с 2 добавлено и 2 удалено
  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
 	}