If all I'm interested is in the moments of my random variable $X$, then given its characteristic function $\varphi _{X}(t)$ we have $$ \operatorname {E} \left[X^{n}\right]=i^{-n}\left[{\frac {d^{n}}{dt^{n}}}\varphi _{X}(t)\right]_{t=0}, $$ then it seems as if all I care about is $\varphi _{X}(t)$ at an arbitrary small neightbourhood of $t=0$. Surely, away from this neightborhood, I can let $\varphi _{X}(t)$ be whatever I want and I will still get all my moments right. Hence the question, what's the point of the characteristic function away from zero?
To illustrate my point, say I let $$ \varphi _{X}(t) = \begin{cases} f(t)& t < -\epsilon\\ g(t)& \text{otherwise}\\ h(t)& t > \epsilon \end{cases} $$ such that $f(t)$ and $g(t)$ are smoothly connected at $t=-\epsilon$ and $h(t)$ and $g(t)$ are smoothly connected at $t=\epsilon$ (which you can apparently do). Then $$ \operatorname {E} \left[X^{n}\right]=i^{-n}\left[{\frac {d^{n}}{dt^{n}}}\varphi _{X}(t)\right]_{t=0} = \left[\begin{cases} i^{-n}{\frac {d^{n}}{dt^{n}}}f(t)& t < -\epsilon\\ i^{-n}{\frac {d^{n}}{dt^{n}}}g(t)& \text{otherwise}\\ i^{-n}{\frac {d^{n}}{dt^{n}}}h(t)& t > \epsilon \end{cases}\right]_{t=0} = i^{-n}\left[{\frac {d^{n}}{dt^{n}}}g(t)\right]_{t=0}, $$ and I can change $f(t)$ and $h(t)$, changing $\varphi _{X}(t)$, without changing the moments of $X$.
My intuition tells me this is wrong since for instance any analitic function is fully characterised by its Taylor series at $x=0$, which knows from the function infinitely away from $x=0$.
What am I missing? Can someone shine some light on this?