After common nouns referring to time, we often replace when with that. In some cases, the relative pronoun/adverb is dropped.
You may come any time when you are free. OR You may come any time that you are free.
I will never forget the day when I first met Jane. OR I will never forget the day that I first met Jane.
In a very informal style, the relative pronoun can be dropped.
I will never forget the day I first met Jane.
You may come any time you are free.
The same thing happens with where after somewhere, anywhere, everywhere, nowhere and place.
I need a place where I can spend the night. OR I need a place that I can spend the night.
Note that that is not possible in this case after other words.
For example, we can’t say: We need a room that we can spend the night. (Only where is possible in this case.)
The prepositional phrase ‘in which’ can be replaced by that after way.
I don’t like the way in which she treats her servants. OR I don’t like the way that she treats her servants. OR I don’t like the way she treats her servants.
In the same way, why can be replaced by that after reason.
Do you know the reason why she is angry with me? OR Do you know the reason that she is angry with me?