TOTP-library gives wrong 6-digit OTP-codes

You should check the return code of timeClient.update(). If the current time cannot be fetched the OTP library will put out a wrong password.