Place rack just above centre; preheat oven to 375.
Thinly remove both ends of onions; peel onions.
Cut each in half around the equator.
Using a sharp knife, cross hatch these inner surfaces with cuts about 1/2 inch apart, going quite deeply down, but not through narrow ends of rounds.
lay them snugly, cut side up, on a rimmed baking tray.
Drizzle with oil, sprinkle with chopped thyme, salt and pepper.
Bake uncovered for 20 minutes.
Transfer onions, cross hatched side up, fitting snugly into a baking dish just large enough to hold all in a single layer, such as a large oval gratin dish or a 9 - 13 inch disyh.
Stir cream with wine; pour over onions.
Cover dish with foil; continue baking for 25 minutes or until onions are tender when pierced with the tip of a knife.
Remove dish from oven; uncover onions.
Increase oven temperature to 450.
Sprinikle onions with Parmesan; then with Gruyere.
Bake uncovered for 8 minutes or until cheese is golden and sauce is bubbling.