How long would I be off after hernia surgery?

Hernia. That depends on what kind of hernia, how big it is, and what you do for work. If you have a desk job and had an uncomplicated hernia repair, you could be back to work in a week. In general, you shouldn't do anything strenuous (the gym, heavy lifting) for 6 weeks.
Depends. Off of what? Work? Usually can return to light work in about a week but need about 6 weeks before doing full heavy work & exercises. Ask your surgeon for their specific instructions for your specific situation.