Fixed the time issue, start time and end time for query are working, need to run tests..