v.20.7Improvement

Fix assert in parseDateTimeBestEffort to resolve issue #12649

Fix assert in parseDateTimeBestEffort. This fixes #12649. #13227 (alexey-milovidov).
Fix an assertion error in the parseDateTimeBestEffort function.

Why it matters

This fix addresses an issue where parseDateTimeBestEffort could fail with an assertion error, improving the robustness of date and time parsing in ClickHouse. It resolves the problem reported in issue #12649, enhancing stability when handling flexible datetime inputs.

How to use it

This fix is applied internally in ClickHouse and requires no user action. Users will benefit from improved datetime parsing automatically after upgrading to the version that includes this fix.