Although the answer by @Colin Fine is correct, it doesn't completely cover the usage.
John: Bill, your grammar isn't good, I think you should study more.
Bill: Huh! Since when are you an expert on grammar? I get better marks than you do.
It's a common informal way of saying "I don't believe that is correct".
On the surface it is saying "As far as I know, X is correct. How long has what you said been right?"
It is slightly combative, but less than saying directly "That's wrong".