Initializing NTP time server with external function

Hi all i am using the NTPClient library in a esp project and i have a form to allow changes of the utp offset and time server but it requires i change them in this line.
NTPClient timeClient(ntpUDP, "pool.ntp.org", 3600); this is called before setup and before any other functions and if i place a function inside of this it inevitably results in a function not in this scope error but how do i get the values from a function into a initializer like this.

To add a bit more scope the function gets the data from a JSON file and returns the value as a string.

Thanks for your advice in advance, Chris.

Since you didn't bother to post a complete code, it's impossible to tell the context in which you're using the NTPClient object. But, I'd consider instantiating it dynamically with the new Operator. You'd do this after you read your file and knew what parameters you wanted to use when creating the object.