Preheat the oven, 200°C/ 400°F/Gas Mark 6. Cut the onions into wedges from the roots to the stems. Melt the butter in a 20cm frying pan with a metal handle. Add the onions and fry over a medium heat for about 5 minutes, turning from time to time until just beginning to brown.
Add the honey and vinegar and cook for a further 5 minutes, moving and shaking the pan occasionally so the onions do not stick to the pan. Arrange the onions so they make a pretty pattern, remembering you will be inverting the tart. Add the thyme stems and season well. Leave to cool while you prepare the pastry.
Roll out the pastry on to a lightly floured surface and cut into a circle slightly larger than the diameter of the frying pan. Lift the pastry over the onions and tuck down the sides of the pan or tin. Make 2 small slits for the steam to escape.
Bake for 25-30 minutes until the pastry is well risen. Leave to stand for 5 minutes. Turn the pastry gently to release; you should be able to spin the tart tatin when it is ready to serve. Cover the pan with a plate, invert then remove the pan leaving the tart now on the plate. Serve warm or cold, with a scattering of rocket and Parmesan shavings.