customs and immigration – Covid travel restrictions germany

I am German and spent the last couple of months abroad. Now I am about to (/need to) go back. Reading about the newly released restrictions, I can not see if my negative covid test has to be not older than 48h at the time of departure of my flight or(!) not older than 48h by the time of actually passing immigration. The German governmental websites and the related media is mixing up terms of “Departure” (“Abflug”) and “Immigration” (“Einreise”) literally everywhere, as so do the information texts of the airlines. Since I am having a trip of 20h (including 6h of layover in Schiphol) and the PCR-test needs 24h for the result, this could be kind of a very close situation.
Anyone with more (reliable) information or experience around this?
Thx in advance