本网以前有过类似的问题,即通常引导时间状语的从句却显然修饰一个名词。传统语法无法解释这种现象,现代语法也较少涉及,但在实际语言中,这种现象无疑是存在的。正如你所说,这个when从句显然不是时间状语从句,也不是传统语法的定语从句(when并不是关系代词或关系副词)或现代语法的关系分句。可以准确无误地说这个when从句是从属连词when引导的时间从句作名词或代词的限制性后置修饰语。我们目前不定称其为定语从句,因为定语从句是有定义的——关系代词或关系副词引导的从句。也不能称其为状语从句(状语的定义不允许这么称呼)。所以,在语法书对这种从句正式予以讨论并给其命名以前,我们不妨称其为从属连词引导时间分句作名词修饰语。
If I were to write a grammar book, I would rewrite the chapter for subordinating clauses, under which there would be two kinds of attributive clauses: those introduced by relative pronouns or adverbs and those introduced by certain conjunctions. And then we would be able to explaine the when clause in your sentence as an attributive clause. But we can't till then!