Based on actual events?
^ Title.
If not, why the WWII setting?
Actually yes, it is based on the story told to Steven Knight when he was 21 by some woman about her brother who got involved into the same situation in WWII.
https://www.youtube.com/watch?v=bbebuDI0sus&feature=youtu.be&t=177
Nolan, I love you forever!share
Any number of terrific WWII movies were NOT based on actual events.
THE GUNS OF NAVARONE is one example, and WHERE EAGLES DARE is another.