The shortest war in history was between Zanzibar and England in 1896. Zanzibar surrendered after 38 minutes – 37 minutes, 23 seconds to be precise.
(It’s called the “War of the Cricket Match”, and it all began when Admiral Sir Henry Rawson gathered his war ships off the coast of Zanzibar so that officers could disembark to watch a cricket match. Incensed at the concentration of warships in his harbour, the Sultan of Zanzibar declared war and sent his only warship into battle. The British responded by bombarding the Sultan’s castle, sinking the lone battleship, and sending the Sultan into exile. I have no idea who won the match though.)