How to deal with advisor who wants me to submit dissertation on time even though there's a major problem? I'm on my last month before the deadline to hand in my dissertation.

I found a severe problem with the work that renders it pretty much pointless and I pointed out to my advisor that I would need some extra time to fix the problem and at least achieve the objective of the work. He basically told me to keep writing the dissertation in order to meet the deadline, without trying to fix the problem. My advisor is also going on a sabbatical, so it feels like he's pushing me towards handing in my dissertation regardless if the work is complete or not. This would pretty much guarantee that I'd have to provide bleak explanations to the committee that will discuss the work with me (because telling them that my advisor rushed me isn't an option).

I really don't want to create a conflict with my advisor. Plus, I'm having a terrible time trying to meet the deadline and my motivation is pretty much gone. I'm considering quitting the program without handing in my dissertation and pursue other career options.

Should I hand in the dissertation even though there's this problem that renders it useless? Or should I try to convince my advisor to get me more time to fix the problem (even though he seems reluctant)? Should I not do any of this and just simply quit the program?
The following is based on my experience in neuroscience. Not sure if this generalizes to other fields.

I think you have two ways to work here, and each is equally "right".

First, you can do exactly as your advisor suggests, working towards completing the thesis even though there's a major flaw. This happens probably more often than you think; I learned halfway through my own thesis that the work I was doing was not generalizable at all due to bad design, and overall was pretty bad science. Oops. The thing is, it's a dissertation, not a peer-reviewed publication. The goal of your dissertation is for you to demonstrate to your committee that you know how to perform research, not for you to contribute overall to science. Your advisor's pushing you to complete your thesis may be him espousing this very idea; namely, your fixing everything up should be saved for your peer-reviewed publications, not for your thesis. Given that (in neuroscience) it is a pretty rare event for someone to refer back to a dissertation thesis when performing a literature search, the fact that your thesis document may be rendered moot isn't such a big deal; mention it in the introduction, results, and conclusion sections and just publish as is. Fix the problem in the journal articles.

The second approach is that, if it has your name on it, it should be publication-worth, and dang if you're going to let something with this obvious an error be in the public record.

Honestly, I don't think either one is wrong. The first one can save you valuable time and advance your career by months/years, and if you're in a field where your thesis doesn't mean much then it's probably the right choice. The second one may make you look better overall, and may be a requirement if your field places more weight on the thesis document itself.

Not sure if that helps, but it may give you some perspective.