Someone told me that, in a hamiltonian system, the hamilonian function is the generating function of the canonical transformation given by time translation. However, this statement doesn't make any sense to me. Typically, the generating function is a function of some of the "old" coordinates as well as the new (transformed) ones, but the hamiltonian is a function of $q$ and $p$.
Please tell me whether the above statement is rubbish, or whether it can indeed be interpreted in a meaningful way.