In any criminal proceeding before a court or grand jury or in any investigation or inquiry before the common council, or any committee thereof, or before any officer conducting an investigation, touching the knowledge of such witness as to any offense committed in violation of the provisions of this chapter or ordinance of the city; the court or grand jury, or the common council, committee or officer, may confer immunity in accordance with the provisions of section 50.20 or 190.40 of the criminal procedure law; provided, however, that no immunity shall be conferred except upon twenty-four hours prior written notice to the appropriate district attorney having an official interest therein.
N.Y. Second Class Cities Law § 243