When should I quit smoking and drinking before an eye surgery?

Immediately. This is a good time to reconsider your habits and use the excuse of the surgery to stop them altogether, especially the smoking which is damaging in the extreme. Drinks should be stopped 2-3 days prior to the surgery.
Yes. Smoking can interfere with healing of your eye and should be discontinued before eye surgery. Alcohol consumption could be a problem and you should speak to your eye surgeon.