I don't know how useful this will be on an old post, but to summarise what I have found out recently:
The best library, I find, is timelib.h, the latest version is (seems to be!) by Paul Stoffregen although the library is listed under the name of Michael Margolis in the Arduino libraries list. It will take time from NTP servers and update an RTC if you have one, or just sit there and tell the time. It seems accurate to within a few seconds a week, even without an RTC, for my digital clock sketch I chose to update my time every 10 days just to be sure it was close enough, but I'm still developing, so it hasn't had the usage to lose or gain any time.
This page
https://github.com/PaulStoffregen/Time is the git location, it's all there. The crucial function call is configTime(), which gets the time from the NTP server and updates the internal clock (software or RTC), though much of the documentation does not mention it at all!
https://github.com/PaulStoffregen/Time/issues/101 makes comment on installation of the library and mentions general issues, but is otherwise not much of a guide.
This page
index.php deals with SOME of the functions in timelib.h
This page
lastminuteengineers.com describes how you use it with a sample code, which worked for me and is the basis of my digital clock. I think that code is one of the examples from the library, but I haven't time to look, now.
Other than this, I used the NTPtime library by German Martin, (a year ago), as I recall, the examples worked fine on an ESP8266 and can be hacked around for your use.
I hope this helps someone. Please excuse ropy formatting.
[EDIT] Maybe I need to explain my parameters for "best": I want to be able to understand the examples to the extent that I can include functions and code from the library examples in my programmes, modify it to suit my purposes and have it work without too many errors.
There may well be better ways to do things, but this is an answer to the question. All I need to do is write a programme that works so I can embed it in my device, give it to my son and get on with something else. At 63 with a dicky heart, I don't have the time nor the memory to learn everything and this is my 10th programming language (let alone the dialects/versions), since I started with FORTRAN in 1975 on punch-card machines. Retirement is also my third career...
If I use the NTP server I don't need the hardware clock, just the Wifi SSID and password.