Set timestamp for date functions (#3070)

This commit is contained in:
Brian Brazil 2017-08-21 17:15:25 +01:00 committed by GitHub
parent 3101606756
commit 2354c2544b
1 changed files with 3 additions and 2 deletions

View File

@ -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 {