Melt butter in a skillet, and then add onions. Sauté for about 5 minutes. Add garlic and sugar and cook for about a minute or until sugar has absorbed and the onions start to get a glaze.
Add wine and let cook down slightly (it’ll finish in the oven).Transfer to a glass dish and add a few sprigs of thyme so the onions. Cover with tin foil and cook on 350 for about 25 min, stirring onions every 10 min or so.
Remove foil and cook for another 10 min or until sauce has thickened and the onions have glazed nicely. Serve with some fresh thyme on top. Enjoy!