At what time are war match ups set?

Hi all,

Just wondering at what point war match ups are set. I know it’s in the “next war starts soon” phase on the war tab but when is it set exactly?

I’ve had several different answers to the question on peer support in game ranging from 6 hours to 3 hours to a minute before the war phase switches to war prep stage.