timezone compatibility; simplified the Q filtering to not rely on datetime.min