C# Generated client fails with SSL error

The generated client for c# keeps failing with the following SSL error. “The remote certificate is invalid because of errors in the certificate chain: NotTimeValid”.

I have verified my system clock. If I try to ignore the SSL error, then the authentication endpoint returns with “Wrong username/password error.”

The request works fine when using Postman.

Has anyone recently encountered this?