Fix infinite loop in timespec_to_string if decimal fraction part is 0 after floor