For $U \neq U(x, t)$ you can actually compute the analytical solution, as it is just advected with velocity $U$ in space.

The classical way showing this is the *Method of Characteristics*:
Assume there are curves $x(t)$ along which the solution of your PDE stays constant:
\begin{align}\frac{\mathrm d C\big(x(t), t \big)}{\mathrm d t} &\overset{!}{=} 0 \\
\Leftrightarrow \partial_t C + \partial_x (C) \dot x &= 0 \end{align}
Now compare this with your PDE: You see that the characteristics have to fulfill the condition $$ \dot x = U \Rightarrow x(t) = Ut + x_0$$
Thus you know the curves along which your solution stays constant: They are simple straight lines.
Now comes the ingenuity of the method of characteristics: As long you stay on a particular characteristic, your solution constant is by definition constant! This means in particular, that you can trace back to your inital condition (which has always to be supplied to have a well-posed problem):
$$C\big(x(t), t\big) = C_0\big(x_0 (x, t) \big)$$
Now it remains to obtain the initial position $ x_0$ belonging to an arbitrarty space-time point $\big(x(t), t\big)$. For this, you can simply reorder the equation of your characteristic to obtain
$$x_0(x, t) = x - Ut$$
Thus, you can rewrite the solution to your PDE as
$$C(x, t) = C_0(x - Ut).$$
Take a moment to realize that this means that you simply advect the intial condition to the left $(U < 0$) or right $(U > 0)$ with velocity $U$, so the "distance" to the initial condition is given by $Ut$.

As you can see, your approximation horribly fails. And I can tell you that all finite-difference based methods will fail miserably for this type equation when equipped with discontinuous initial data. The reason lies in the fact the finite difference schemes rely on sufficiently smooth solutions. As demonstrated, the solution you are looking forward to is not even in $C^0$. the better way to tackle this sort of problems are finite volume methods in the framework of weak solutions.