time comparison for notifications