v.23.4Improvement
Format string "%f" in formatDateTime() now prints "000000" for no fractional seconds, with option to restore previous behavior.
Format string "%f" in formatDateTime() now prints "000000" if the formatted value has no fractional seconds, the previous behavior (single zero) can be restored using setting "formatdatetime_f_prints_single_zero = 1". #48422 (Robert Schulze).
Why it matters
This change improves consistency in the output of fractional seconds when formatting dates and times. It ensures that the%f specifier always produces six digits, which is important for applications requiring fixed-width fractional second representations.How to use it
By default,formatDateTime() with "%f" outputs "000000" for no fractional seconds. To revert to the previous behavior where a single zero is printed, set the server setting formatdatetime_f_prints_single_zero to 1.