Year One is pretty bad, despite it being an Apatow movie, and despite having two fairly talented comedic actors as the leads.
The first 20 minutes or so are horrific. Unfunny, forced, lazy writing - you name it. I almost turned it off.
But then Jack Black gets it going a little bit, and by the time the plot moves to Sodom, there are actually a few funny parts.
As bad as it starts, it does get a little better. If you are willing to trade two hours for a few late laughs, have at it.