"Could not connect to server" on Switch

It is impossible for me to log into my account on Switch and therefore to play online.
I start up the game and when I select “Log in”, it loads for about a second and then stops. After about 10 tries, it starts giving the error “Could not connect to the server”. If I play offline first and then select online, the same thing happens. I have a stable WiFi connection and all other games work perfectly. I have tried restarting the Software, restarting the Switch, deleting local save data and deleting and redownloading the game and using a different WiFi.

Steps to reproduce:

  1. Open game.
  2. Select “Log in”

Expected Results:
Login screen.
Actual Results:
Loading and cancelling the first few times, then Error: Could not connect to the server.


Game Version:
System Information:
Nintendo Switch on most recent firmware.

I have finally figured out this problem thanks to another user. This can happen when your Switch console is set to an incorrect date, especially a date in the future. (This makes SSL certificate checks fail, because the console thinks our certificate is expired.)

Set your console to the correct date, and you will be able to connect once more.