Skip to content

Commit

Permalink
Fix comparison timezone check
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Feb 3, 2025
1 parent 70122ad commit b452da6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/queries/metricsview_aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ func (q *MetricsViewAggregation) rewriteToMetricsViewQuery(export bool) (*metric
res.IsoDuration = q.ComparisonTimeRange.IsoDuration
res.IsoOffset = q.ComparisonTimeRange.IsoOffset
res.RoundToGrain = metricsview.TimeGrainFromProto(q.ComparisonTimeRange.RoundToGrain)
if q.ComparisonTimeRange.TimeZone != "" && qry.TimeZone == "qry.TimeZone" {
if q.ComparisonTimeRange.TimeZone != "" {
if qry.TimeZone != "" && qry.TimeZone != q.ComparisonTimeRange.TimeZone {
return nil, fmt.Errorf("comparison_time_range has a different time zone than ")
}
qry.TimeZone = q.ComparisonTimeRange.TimeZone
}
qry.ComparisonTimeRange = res
Expand Down

0 comments on commit b452da6

Please sign in to comment.