Add time check query