I came up with the ESP Time Machine(tm)
The idea is that the DS3231 board can be popped into a breadboard - power is applied and the ESP32 gets the time from an SNTP server - and programs the RTC
I couldn't get the ESP32 clock component to work
![Sad :-(](./images/smilies/icon_e_sad.gif)
I haven't handled DST / BST- though the code does show how to retrieve it if needed...
Th prototype - I have two LEDs one for 'connection' and one for SNTP sync. I'd be tempted to add a 3rd (error) red LED to light if it can't connect to wi-fi. It outputs the time to UART after programming - though this is probably unnecessary as it id intended to program RTCs for other projects. The ESP32 board doesn't sit well on the breadboard - but I'd envision it in a 'custom' case with a (labelled) socket for the RTC board.
You'll need to set SSID and Password.... I was also tempted to do without resistors for the LEDs and use the ESP32 pullups instead (keep the project cost down !)
One oddity - adding the DS3231 component doubles the i2c address - need to set to 104 (which had me scratching my head for a while)
Martin