In the case of a time symmetry, we have \(f_i=0\) and \(g=1\):
\begin{align}
t'=t+\delta \epsilon
\tag{5.27}\end{align}
This gives the conserved quantity:
\begin{align}
Q=-\left(\sum_{i=1}^np_i\dot{q}_i-L\right)
\tag{5.28}\end{align}
and, since the overall sign is immaterial, so is \(\sum_{i}p_i\dot{q}_i-L\).
We have already seen that when the Lagrangian does not explicitly depend on time, the quantity:
\begin{align}
h=\sum_{i=1}^np_i\dot{q}_i-L
\tag{5.29}\end{align}
is conserved. Of course, if the Lagrangian does not depend on time, then the action will be invariant to a time translation.