Asking it directly is a good way to get a response containing version numbers that look correct, but not a good way to actually indicate which versions it's been trained on.
A better method would be to look at the language features it's using and infer from there. Or, better still, look at which versions were out when the training data was collected (which I believe is September 2021, don't quote me on that).