The diffusion equation with nonlocal data