Let X be a Lévy process on the real line, and let Fc
denote the generalized arcsine law on [0, 1] with parameter c. Then t
−1 ⨍0
t
P
0(X
s
> 0) ds → c as t → ∞ is a necessary and sufficient condition for t
—1 ⨍0
t
1{Xs
>0}
ds to converge in P
0 law to Fc. Moreover, P
0(Xt
> 0) = c for all t > 0 is a necessary and sufficient condition for t
—1 ⨍0
t
1{Xs
>0}
ds under P
0 to have law Fc
for all t > 0. We give an elementary proof of these results, and show how to derive Spitzer's theorem for random walks in a simple way from the Lévy process version.