Section 287(2) in The U.P. Municipalities Act, 1916
(2)Provided that, -(a)except when it is in this Act or in rules or bye-laws otherwise expressly provided, no entry shall be made between sunset and sunrise; and(b)except when it is in this Act or in rules or bye-laws otherwise expressly provided, no building which is used as a human dwelling shall be so entered, except with the consent of the occupier thereof, without going the said occupier not less than four hours previous written notice of the intention to make such entry; and(c)sufficient notice shall in every instance by given even when any premises may otherwise be entered without notice, to enable the inmates of an apartment appropriated for females to remove to some part of the premises where their privacy need not be disturbed; and(d)due regard shall always be had to the social and religious usages of the occupants of the premises entered.