It is computed using only information embedded in the block chain, specifically the timestamps of blocks 2016 * i and 2016 * (i+1).
Once embedded in the header, everyone will agree on past timestamps as they agree on the chain with the most accumulated difficulty.