added where for time sql
Merge remote-tracking branch 'origin/combine_ui_bt' into combine_ui_bt