Kinda funny to imagine it.
You're inside a port, locked at a battleship, looking at the clock and whispering "don't fire the torpedos just yet... we will be at war in 12 seconds... wait for my signal!"
What if the torpedo is on the water before the war and hit the ship minutes later, when the war is already on... does it count?
And what if you sink some ships some hours before the war, and return home after the war is started, claiming you sank those ships after the war was started? How in the world they can prove otherwise?