I have calculated the Fourier series in Mathematica for a function on an interval $[-3,3]$ and on an interval $[-\pi,\pi]$ and they are exactly the same.
The function is:
\begin{equation} f(\xi)=\begin{cases} 2, \ \ \ \ -2\le \xi<-1 \\ 1, \ \ \ \ -1\le \xi<0 \\ 2, \ \ \ \ 0\le \xi<1 \\ 3, \ \ \ \ 1\le \xi\le2, \end{cases} \end{equation}
They seem scaled, but have not changed at all.
The core of this lies in the Fourier coefficients. Can someone explain how the Fourier coefficients become the same on $[-3,3]$ and on an interval $[-\pi,\pi]$?
The coefficients are:
$$\alpha_0=\frac{1}{2a}\int_{-a}^a f(\xi)d\xi$$
$$\alpha_k=\frac{1}{2a}\int_{-a}^a f(\xi)\cos\omega k\xi d\xi$$
$$\beta_k=\frac{1}{2a}\int_{-a}^a f(\xi)\sin\omega k\xi d\xi$$
Where $\omega=\frac{n\pi}{a}$