format times properly