ID shell casings, ww2 Tirpitz?

I have received two shell casings, allegedly picked up after the attack
on Tirpitz in a Norwegian fjord in 1942. I know the farmer who had these shell casings, and Tirpitz was indeed anchored just outside the farms kitchen windows. I wonder if anyone could confirm if these shell casings are from the right time periode, and if they coukd be used by German artillery. I know absolutely nothing about ID, but I have my doubts since, if these shells are marked with production year, one of them says “1954” … Anyone who could help? Only one photo uploaded for now due to site restrictions, letters on the side of the casing reads “UB-788 U-44”.

This is a US 40x311R case made in 1944. I guess this answers it all.

Also I think the Tirpitz did not even have guns (40 L/60 Bofors) aboard that could have used this caliber.