  In this paper, we study the law of the local time processes $(L_T^x(X),x\in
\mathbb{R})$ associated to a spectrally negative L\'evy process $X$, in the
cases $T=\tau_a^+$, the first passage time of $X$ above $a>0$ and $T=\tau(c)$,
the first time it accumulates $c$ units of local time at zero. We describe the
branching structure of local times and Poissonian constructions of them using
excursion theory. The presence of jumps for $X$ creates a type of excursions
which can contribute simultaneously to local times of levels above and below a
given reference point. This fact introduces dependency on local times, causing
them to be non-Markovian. Nonetheless, the overshoots and undershoots of
excursions will be useful to analyze this dependency. In both cases, local
times are infinitely divisible and we give a description of the corresponding
L\'evy measures in terms of excursion measures. These are hence analogues in
the spectrally negative L\'evy case of the first and second Ray-Knight
theorems, originally stated for the Brownian motion.
