Section 247(1) in Criminal Court Rules of the High Court of Judicature at Patna
(1)An officer or soldier required to attend a Court in his official capacity should appear in uniform with sword or side arms. Attendance in an official capacity includes attendance-(a)as witness when evidence has to be given of matters which came under the cognizance of the officer or soldier in his military capacity,(b)by an officer for the purpose of watching a case on behalf of a soldier or soldiers under his command.