For my mother's clock project, I ended opting to use TimeLib for the time tracking as the current esp8266 time library breaks in 2038 and when I started the project, there were some severe issues in the esp8266 code that made it unusable for me.
I ended up with a little bit of an odd combination of things that ended up working out pretty well.
I store the time in the RTC in local time rather than GMT and use the RTC as sync provider for TimeLib.
I abuse the API by using munged up time_t values rather than proper time_t values.
I really didn't like doing this but it makes a lot of things simpler and worked better than trying to do it the way it should be done.
Rather than NTP I use worldtimeapi.org to get the local time based on IP address and use that to set the RTC on powerup/reset and once every day at 02:00:15 (the daily sync to worldtimeapi will catch the DST changes)
I parse the JSON output to get the needed fields.
I only turn on the WiFi radio during the worldtimiapi sync so it is off and not attached to the network most of the time.
Buttons can also set the time. When the time is changed, it sets the RTC and the TimeLib time.
The RTC library (DS3231) can get/set the time using a time_t which makes things easy.
By abusing the API to use munged time_t values to represent local time everything gets simpler.
You get a time_t value from the DS3231 library which is not correct but rather represents a time_t value that can be given directly to TimeLib which will cause it to present the current local time using the TimeLib APIs.
To set the RTC you pass in this same munged time_t which makes things really simple.
To get from the local time values presented by worldtimeapi.org I use the TimeLib function makeTime(tm) which takes the local time values and creates a munged time_t that can be given to the RTC library to set the RTC.
Yeah, having done lots of unix time code over the years, it initially really bothered me to do it this way, but given my requirements, I didn't have much choice, other than using ezTime which I initially tried but it was too broken to use.
In the end, it ended up being fairly trivial to implement it this way and it is supercool to have it autoset itself, with no messing with timezone configuration.
--- bill