correct timestamp filter logic