(b)If an offence under this section is committed, after sunset and before sunrise or after preparation for resistance to lawful authority or where the offender has been previously convicted of a like offence, the magistrate having jurisdiction may inflict double the penalty prescribed for such offence.