time(it) magic: reorganize time formatting code

Signed-off-by: Jan Schulz <jasc@gmx.net>