時に

the in 時に implies a specific time, meaning it can be used to describe non-habitual actions.

学生の時、自転車で旅行していました。 When I was a student, I always traveled by bicycle.

学生の時に、自転車で旅行した。 When I was a student, I traveled by bicycle