Whenever any person who is an employee subject to the provisions of Section 1230, or an employee of the state, is served with a subpoena which compels his presence as a witness, unless he is a party or an expert witness, such employee shall be granted a leave of absence with pay in the amount of the difference between the employee’s regular earnings and any amount he receives for such appearance.
This section shall not be applicable to appearances for which the employee receives compensation in excess of his regular earnings.