Query interval start/end is now taken into account.

Time interval start/end have been ignored for data stored in in-memory ring buffer. This patch is solving that problem.