It is easy to miss the point that in the second definition $\mathbb Q/\mathbb Z$ is required to be discrete in Hiro's question.
Hence even if a continuous morphism $f:G\to T$ has image in $\mathbb Q/\mathbb Z$ it cannot automatically be considered as a continuous map $f_0:G\to \mathbb Q/\mathbb Z$ and so might not be a character in the second sense.
An example for this failure is to take $G=T_{tors} =\mathbb Q/\mathbb Z\subset T$ , the torsion subgroup of $T$ with its induced topology from the circle and for the character $f $ (in the first sense) the inclusion $f:G\hookrightarrow T$.
Even though $G$ is torsion, the corestricted morphism $f_0:G\to \mathbb Q/\mathbb Z$ is not a character in the second sense, since it is not continuous.
However if $G$ is compact $and$ a character hason a compact group $G$ happens to have values in $\mathbb Q/\mathbb Z$, thenso that both definitions can be compared, then its image is discrete in in the circle, hence is finite and the two concepts coincide.
This appliesXandi explains in particular tohis answer that this is always the case for profinite groups (since they are automatically compact).