If you are in the military on active service, especially if you are an officer, there is no such thing as "off duty". Crimes committed off duty are normally prosecuted by both the military and civilian authorities.