Getting year 2106 from NTPClient.getEpochTime when NTP server unreachable

In my code I’m trying to update a DS3231 RTC ONLY if it needs updating. NTP returns a date that’s way in the future, and the RTC is updated to a date/time in year 2106. If the NTP server is reachable, then all is OK. This only happens when WiFi is down of NTP otherwise unreachable.
So, I asked Copilot about the issue and it was suggested to downgrade the library to 2.7.4 (now at arduino-libraries/NTPClient@^3.2.1). I edited my project’s platformio.ini thusly:

platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =

And I get the following after the edit in the output window:
Resolving d1_mini dependencies…
Removing unused dependencies…
SemanticVersionError: Invalid simple block ‘^’

This has me baffled - I have to comment out all library dependencies to get rid of the message. It builds OK but why I don’t know because the lib_deps are commented out now. Any ideas for that message? I’m at a loss here.