[PATCH] select: time comparison fixes