add range queries for time recording
Merge origin/master