Reindent the code about date and time formatting

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>