Preheat oven to 180c and grease a gratin dish (23×23) with butter. Slice courgette 0.2cm thick using a mandolin or knife and set aside. Slice the potatoes to the same thickness and keep separate
In a large pan heat the cream,milk , half the thyme and garlic until simmering and add the potatoes. Return to a simmer for 4 minutes season with salt and plenty of pepper.
With a slotted spoon strain out 1/2 the potatoes and arrange in a layer in bottom of the dish. Add 1/2 the cream mixture, then cover with 1/2 the courgettes by overlapping. Scatter with 1/2 cheese grated.
Repeat with the remaining potatoes cream and courgette. Press down so the cream seeps up and cover with remaining cheese and thyme
Cover with foil and bake for 1hr 15mins until knife slides easily. Remove foil and bake for another 10mins. Cool for 5mins before serving.