Omne quod est necesse est esse quando est, et omne quod non est necesse est non
esse quando non est. Et haec necessitas fundatur super hoc principium:
impossibile est simul esse et non esse: si enim aliquid est, impossibile est
illud simul non esse; ergo necesse est tunc illud esse. [my emphasis]
I.e. everything that is the case, is necessarily the case, when it is the case. This is because (he argues) it is impossible that the same thing should be the case, and not be the case at the same time. At first sight his argument seems absurd. It is sunny now. Might it not be sunny now? Of course. And this doesn't involve supposing a contradiction, because although 'it is sunny' is true now, to suppose that it were not sunny now involves supposing that 'it is sunny' is not true now. So no contradiction is involved. Aquinas seems to be confusing the possibility of its being p, but being possibly not-p, i.e.
possibly( p and possibly not-p)
which does not involve a contradiction, with the possibility of being p and not-p, i.e.
possibly( p and not-p)
which does involve a contradiction.
Or does he mean something else? Is he denying the sort of 'instantaneous counterfactual' that we take for granted in modern philosophy? In everyday life, we take it for granted that the realisation of any possibility takes time. Might it not be sunny? Only if the clouds pass in front of the sun. But when the clouds pass in front of the sun, it will not be now, and the qualification 'when it is sunny' no longer applies. Time must pass in order to realise the possibility. Perhaps this is the meaning of Aquinas qualification 'when it is p' (quando est). This would be consistent with Augustine's view that God cannot change the past, because would be to turn what was the case, into what wasn't the case. For the same reason, he cannot change the present. For if it took take time to do that, it would no longer be the present. If it did not, this would be turning what is the case, into what isn't. See The Frozen Past.