Before the past happened God already knew what was going to happen. He knew every decision that was going to be made and the consequences of those decisions. If He wanted to change “the past” He could do so before the past became the past.
God creates by command. How long it takes that command to be completed is a different question. Which is why I don’t believe the 6 days of creation are literal days when we know that creation took longer than 6 days.