From 2354c2544bb5aab2a86f3a0395c4dba718e2a355 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Mon, 21 Aug 2017 17:15:25 +0100 Subject: [PATCH] Set timestamp for date functions (#3070) --- promql/functions.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/promql/functions.go b/promql/functions.go index f5b8ea1de..d4dd01415 100644 --- a/promql/functions.go +++ b/promql/functions.go @@ -914,8 +914,9 @@ func dateWrapper(ev *evaluator, args Expressions, f func(time.Time) model.Sample if len(args) == 0 { v = vector{ &sample{ - Metric: metric.Metric{}, - Value: model.SampleValue(ev.Timestamp.Unix()), + Metric: metric.Metric{}, + Value: model.SampleValue(ev.Timestamp.Unix()), + Timestamp: ev.Timestamp, }, } } else {