Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #634 from raintank/fix-timestamp-shifting
Browse files Browse the repository at this point in the history
fix timestamp shifting. fix #633
  • Loading branch information
Dieterbe authored May 10, 2017
2 parents 9dd3b0d + b3c03b0 commit 55c4819
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api/models/series.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,17 @@ func (series SeriesByTarget) Pickle(buf []byte) ([]byte, error) {
}
data[i] = seriesForPickle{
Name: s.Target,
Start: s.QueryFrom,
End: s.QueryTo,
Step: s.Interval,
Values: datapoints,
PathExpression: s.QueryPatt,
}
if len(datapoints) > 0 {
data[i].Start = s.Datapoints[0].Ts
data[i].End = s.Datapoints[len(s.Datapoints)-1].Ts
} else {
data[i].Start = s.QueryFrom
data[i].End = s.QueryTo
}
}
buffer := bytes.NewBuffer(buf)
encoder := pickle.NewEncoder(buffer)
Expand Down

0 comments on commit 55c4819

Please sign in to comment.