They seem to mean the same, although I hear 「学生の時」 much more often.
Another example I'm unsure of is: 「犬が病気(の・だった)時、病院に連れていきました。」 "I took the dog to a vet when it was sick." Are both options OK?
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.
Sign up to join this communityBoth can be used almost interchangeably, but I guess の時 is more often used as you feel.
One obvious limitation is that だった時 cannot be followed by a generic statement.
Same for repeated event:
だった時 fits okay in one-off events like 病院に連れて行きました so that 犬が病気(の・だった)時、病院に連れていきました are both fine. (Still I feel の is more common, though.)