Make sure to set the time correctly if it isn't provided.