In The Economic Approach to Human Behavior, Gary Becker said:
The combined assumptions of maximizing behavior, market equilibrium, and stable preferences, used relentlessly and unflinchingly, form the heart of the economic approach as I see it.
The emphasis is mine. Here "stable preferences" refer to preferences (and by association, the utility functions representing them) that are more or less the same across different periods. The reason for preference stability is obvious. If we allow preference or utility function to change arbitrarily, then we'd be able to explain pretty much anything by attributing the cause to some appropriately chosen change in people's preference.
When it comes to the intertemporal preferences in particular, I agree with @MaartenPunt that, at least in principle, one can incorporate time-dependence into utility function. For instance, in the usual discounted utility framework, we have
\begin{equation}
U(\mathbf x_t)=\sum_{t=0}^\infty D(t)u(\mathbf x_t)
\end{equation}
where $\mathbf x_t$ is a vector of consumption goods at time $t$, $D(\cdot)$ is a discount function (e.g. $D(t)=\delta^t$ as in an exponential discounting model), and $u(\cdot)$ is the time-invariant period utility function. To incorporate time-dependence, we can simply allow $u(\cdot)$ to also be a function of time
\begin{equation}
U(\mathbf x_t)=\sum_{t=0}^\infty D(t)u(\mathbf x_t,\color{red}t).
\end{equation}
To make @MaartenPunt's third comment more explicit, suppose
\begin{equation}
u(\mathbf x,t)=\alpha_t^1v(x^1)+\cdots+\alpha_t^iv(x^i)+\cdots+\alpha_t^nv(x^n)
\end{equation}
where $x^i$ denotes the quantity consumed of good $i$ and $\alpha_t^i$s are the time-dependent weights on the utility derived from each good $i$.
So the same consumption bundle will generate possibly different levels of utility in different time periods. For example, $\alpha_{10}^\text{candy}>\alpha_{40}^\text{candy}$ would capture the fact that a 10-year-old values a candy more than a 40-year-old does. On the other hand, a time-invariant preference would imply that $\alpha_t^i=\alpha^i$ for all $t=0,1,\dots$.
The above discussion is however distinctly different from the paper you linked to in the comment, which is about dynamic (in)consistency of choices. In the literature on intertemporal choices, the main focus is usually about whether some optimal consumption profile decided at time $t$ will remain optimal when reevaluated at some future time $t+k$.
Usually papers in this literature maintain the assumption of time-invariant period utility function, i.e. $u(\mathbf x,t)=u(\mathbf x)$, but play with various forms of the discount function $D(\cdot)$ (e.g. hyperbolic or quasi-hyperbolic discounting) to generate predictions that match experimental data.