Joshua 10:12-13—Then spake Joshua to the LORD in the day when the LORD delivered up the Amorites before the children of Israel, and he said in the sight of Israel, Sun, stand thou still upon Gibeon; and thou, Moon, in the valley of Ajalon. And the sun stood still, and the moon stayed until the people had avenged themselves upon their enemies. Is not this written in the book of Jasher? So the sun stood still in the midst of heaven and hasted not to go down about a whole day.
Kings of the land gathered to attack the Hivites who had made peace with Israel. Joshua was a man of integrity. He honored the treaty with the Hivites even though it had been made through deceit. The LORD encouraged Joshua to attack the kings and not be afraid. God even caused hailstones to take out the fleeing armies of the kings. There were so many soldiers that were confused that Joshua asked God to give him more time. God answered that prayer by almost doubling the hours in that day. This was not a natural phenomenon, and it just cannot be explained. It was miraculous. It was God doing what He had promised to do. It was not as though the Israelites had been perfect. This whole battle was due to not consulting the LORD. But their heart was right with God. They recognized their mistake and were obedient. This time God’s instruction was to go and defeat the enemy. God took a bad situation and used it to give them a one-day victory over five kings, expediting their victory over the land. Because you made a mistake in the past that has consequences today does not mean the LORD can’t use it for your good. Listen to Him today. Obey Him today and watch what looks like a problem turn into a blessing when God fights for you.