You hadn't better do it.
This sentence is to check somebody whether he/she can make negative sentence with "had better" or not. I don't know whether this sentence is in present time or past time. Please tell me. Does this sentence show present tense or past tense?
(Technically, the "not" in "hadn't" should be after "better", but I'll ignore that for now.) It's present, because you're telling someone not to do something. Past tense (as in, telling someone they shouldn't have done something in the past) would be:
You hadn't better not have done it.
But that's a mouthful and no one would say that anyway; they would shorten it to:
You better not have done it, or You had better not have done it.