tsfmt is constant, initialize it only once

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>