Search from various English teachers...
みんなの日本語24課 時 vs  と
Question 1 of 5

その部屋を【 出る時 or  出ると 】エアコンを消しましたか。

出る時
出ると