Suppose L is open so that for any t0 in L, there is a small r such that (t0-r, t0+r) is in L.

If L is not open, for example L=[a,b), we can only define D/dt(Z|L) from the right side of a, thus there is a small r such that [a, a+r) is in L so the statement still holds.