Problem with Noether Theorem to prove that energy is conserved Suppose an action $S = \int _{t_1}^{t_2} L(q(t),\dot{q}(t))$ that is invariant under an infinitesimal constant time translation $t \longrightarrow  t' = t + \epsilon$, of course with $\epsilon = constant$, such that
\begin{equation}
q(t) \longrightarrow q(t + \epsilon) = q(t) + \epsilon \dot{q}, \delta q = \epsilon \dot{q} \\ \dot{q}(t) \longrightarrow \dot{q}(t + \epsilon) = \dot{q}(t) + \epsilon \ddot{q}, \delta \dot{q} = \epsilon \ddot{q}.
\end{equation}
So the variation on action $S$ will be 
\begin{align}
\delta S &= \int _{t_1} ^{t_2} dt\ \left[ \frac{\partial L}{\partial q}\delta q + \frac{\partial L}{\partial \dot{q}}\delta \dot{q} \right ]\\
&= \int _{t_1} ^{t_2} dt\ \left [ \epsilon \dot q \frac{\partial L}{\partial q} + \epsilon \ddot{q} \frac{\partial L}{\partial \dot{q}} \right ] \\ &= \int _{t_1} ^{t_2} dt\ \epsilon \left [ \frac{dL}{dt} \right ] \\ &= 0.\\
\Longrightarrow \frac{dL}{dt} = 0.
\end{align}
Assuming the Lagrangian has no explicit dependence of time, we have
\begin{equation}
\frac{dL}{dt} = \frac{\partial L}{\partial q} \dot{q} + \frac{\partial L}{\partial \dot{q}} \ddot{q} = 0. 
\end{equation}
At this point, I don't see how to obtain that the Hamiltonian of the system is conserved, as the textbooks I've read say. Did I make some wrong assumption or computation? 
 A: There are at least 2 lessons to be learned from OP's set-up:


*

*Noether's theorem is not necessarily about strict symmetry of the action. It is enough if the action has an (infinitesimal) quasi-symmetry, i.e. symmetry up to boundary terms.

*There's no free lunch. To prove energy conservation, one must use a non-trivial assumption: In this case, that the Lagrangian has no explicit time-dependence. How to do it is explained in this related Phys.SE post.
A: Edit:
The Noether Procedure instructs you to take $\varepsilon = \varepsilon(t)$ to be time dependent.
$$
\delta q = \varepsilon(t) \dot q \hspace{1 cm} \delta \dot q = \dot \varepsilon(t) \dot q + \varepsilon(t) \ddot q
$$
\begin{align*}
\delta L &= (\varepsilon \dot q) \frac{\partial L}{\partial q} + (\dot \varepsilon \dot q + \varepsilon \ddot q) \frac{\partial L}{\partial \dot q}\\{\partial \dot q}
&= \varepsilon \dot L + \dot \varepsilon \dot q \frac{\partial L}{\partial \dot q} \\
&= \varepsilon\dot  L + \dot \varepsilon \dot q p
\end{align*}
By the principle of least action, $\delta S = 0$ for any tiny variation $\delta q$ for which $\delta q(t_1) = \delta q(t_2) = 0$. Here, that means $\varepsilon(t_1) = \varepsilon(t_2) = 0$. 
\begin{align*}
\delta S &= \int_{t_1}^{t_2}\big( \varepsilon \dot L + \dot \varepsilon \dot q p \big)dt \\
&=\varepsilon \dot q p \Big\vert_{t_1}^{t_2} +  \int_{t_1}^{t_2} \varepsilon \Big( \dot L - \frac{d}{dt} (\dot q p) \Big) dt \\
&= -\int_{t_1}^{t_2}\varepsilon \dot H dt
\end{align*}
where $H = \dot q p - L$ is the Hamiltonian. Therefore on solutions to the equations of motion $\dot H = 0$ and energy is conserved.
Now, the principle of least action states that all physical paths make the action stationary ($\delta S = 0$) IF we take the tiny variation $\delta q = 0$ on the boundary $t = t_1$ and $t = t_2$. This means that we should expect to have $\delta S =0$ only if $\varepsilon(t_1) = \varepsilon(t_2) = 0$.
If $\varepsilon = {\rm constant}$, then that means the constant must be zero.
If $\varepsilon(t)$ is not a constant, then requiring $\delta S = 0$ gives you something non trivial, namely that energy must be conserved on all stationary paths.
(The fact that, if $\varepsilon = {\rm constant} \neq 0$ then $\delta S$ is a boundary term, as you derived in your question statement, is important though. It shows that if you take a path which is a solution to the equation of motion and translate it in time, the resulting path will also be a solution to the equation of motion.)
A: Let's first clarify which formulation of Noether's theorem we'll be using:
The Lagrangian will be a function
$$
L = L(x,v,t)
$$
and the action a functional
$$
S[q] = \int_{t_1}^{t_2} L(q(t),\dot q(t),t) \,dt
$$
Proposition. If the transformation
$$ t\to t'(t) = t + \epsilon T(t) $$
$$ x\to x'(x,t) = x + \epsilon X(t)$$
$$
q'(t') = q(t(t')) + \epsilon X(t(t'))
$$
is a quasi-symmetry of the action
$$
\delta S \approx \Delta K
$$
on-shell (ie assuming the equations of motion), then there is a conserved quantity
$$
\frac{d}{dt} \left( \frac{\partial L}{\partial v} (X - \dot q T) + LT - K \right) \approx 0
$$
Here,
$$ \delta S = \frac{d}{d\epsilon}\Big|_{\epsilon=0} S[q'] $$
$$ \Delta K = K(t_2)-K(t_1) = \int_{t_1}^{t_2}\frac{dK}{dt} dt $$
Proof. Given in this answer.
We also need a result from the body of the proof, namely that
$$
\delta S = \int_{t_1}^{t_2}\left[ \frac{\partial L}{\partial x}X + \frac{\partial L}{\partial v} (\dot X - \dot q \dot T) + \frac{\partial L}{\partial t} T + L \dot T\right]\,dt
$$
Now, there are two ways to arrive at
$$
\frac{d}{dt} \left( \frac{\partial L}{\partial v} \dot q - L \right) \approx 0
$$
First, we can choose $X = 0$ and $T = 1$, ie
$$
t\to t'(t) = t + \epsilon
$$
Then, we have
$$
\delta S = \int_{t_1}^{t_2} \frac{\partial L}{\partial t}  \,dt
$$
If $L$ has no explicit time dependence, the result follows with $K = 0$.
Second, we can choose $X = \dot q$ and $T = 0$, ie
$$
x\to x'(x,t) = x + \epsilon \dot q(t)
$$
Then, we have
\begin{align}
\delta S &= \int_{t_1}^{t_2}\left[ \frac{\partial L}{\partial x}\dot q + \frac{\partial L}{\partial v} \ddot q \right]\,dt
\\&= \int_{t_1}^{t_2}\left[ \frac{d}{dt} L(q,\dot q,t) - \frac{\partial L}{\partial t} \right]\,dt
\end{align}
If $L$ has no explicit time dependence, we again arrive at our conservation law, but this time with
$$ K(t) = L(q(t), \dot q(t), t) $$
Your approach follows this second path. However, as $K \not= 0$, we're dealing only with a quasi-symmetry of the action, so your assumption $\delta S = 0$ was not warranted.
A: So the other answers have given a solid response but it is a little high-level, I wanted to give a more verbose explanation of what has happened.
In your procedure you have an action integral $S = \int_T\mathrm  dt~L(q(t),\dot q(t), t)$ over some time domain $T$. You now want to vary the time coordinate. This means that the domain $T$ is changing, so that strictly speaking the definition of the action integral is also changing. When you assumed that $\delta S = 0$ for $\epsilon \ne 0$ you therefore made an extra assumption which was not warranted, and this is how you ended up with a strange expression that $\mathrm dL/\mathrm dt - \partial L/\partial t=0$ where you in your case can discard the second term.
Those are two different operations, setting $\delta S = 0$ and setting $\partial L/\partial t = 0$. Combine them at your own risk.
Indeed getting this answer $\delta S = \epsilon ~L|_T$ is kind of nice in that the expression on the right really is more or less what you are expecting by translating the integral over by a time $\epsilon$. So your choice of these infinitesimal transforms $q \mapsto q + \epsilon \dot q$, $\dot q \mapsto q + \epsilon \ddot q$ has been vindicated as a valid idea for effectively translating the Lagrangian in time! Good job. :)
But instead where you would like to go is, starting from$$\delta S/\epsilon = L|_T = \int_T \mathrm dt~\left( {\partial L\over\partial q}~\dot q + {\partial L\over\partial \dot q}~\ddot q \right),$$ to integrate the second term by parts so that you have a single term:
$$L|_T = \left[\dot q~\frac{\partial L}{\partial \dot q} \right]_T + \int_T \mathrm dt~\dot q~\left( {\partial L\over\partial q} - \frac{\mathrm d~}{\mathrm dt} {\partial L\over\partial \dot q}\right),$$ at which point you argue that the integral on the right is an integral of zero (because those are the Euler-Lagrange equations) so that these two boundary values on the left must be equal. Since they are equal, $p~\dot q - L = H$ is the same at the bounds of $T$ and one can argue that it must also be the same inside $T$ as one can partition $T$.
My instructors back at Cornell were very careful to stress that the sort of argument you make when you vary $t$ is very different from the sort of arguments you make when you vary the spatial coordinates, until you get to the field version where they all get handled by these sorts of vary-$t$-arguments because you now have an $\int \mathrm d^4 x$ going on here containing both a time and space component, and so you have to think about boundary terms all the way throughout.
