@Flohack I am not exactly sure. I can say that when the Wifi wasn't working, it also automatically set my date to 1970.
I set it aside for a while and put it on the charger. I turned on the screen again and saw that the date and time was correct and the Wifi was working.
So maybe it had something to do with the battery not being charged?