Prelude's answer is the way to go, on the assumption you've filled a time_t with the user info. You might have gotten a hint if you had checked "currentTime==timeinfo"; my man page says

and yours...