They didn’t know it was over because the battle happened after the war was over. The treaty of Ghent was the treaty that ended the war, it was signed by the commissioners BEFORE the actual war began, people found out about the treaty slowly, word didnt get around quick enough and the battle began after the treaty was signed. (The treaty was signed before the fighting began)