I have just written a Python code ploting DFT's using the convolution product:
$$y[t] = u[k] * h[k] = \sum_{k=-\infty}^{+\infty} u[k] h[t-k]$$
I'll take a high resolution so the graph is more precise. Here is a simple example,for $h(t) = \delta(t)$ and $u(t) = \sin(t)\nu(t)$:
So far, so good. The causal system gives a causal answer.
Yet, for $h(t) = \nu(t) - \nu(t-6)$, I obtain this graph:
The causal signal gives a non-causal answer. Indeed, $y(t)$ is not equal to $0$ for $t<0$ How is it possible ? Maybe is it a mistake from my code ?


As cleverly suggested by @AndreasLenz, I wrote $k-t$ instead of $t-k$ in the convolution formula:
It is now corrected and the new graph is causal as expected:
Thanks a lot !