v.22.9Improvement

Support %z Descriptor for Timezone Offset in formatDateTime

Support the %z descriptor for formatting the timezone offset in formatDateTime. #40736 (Cory Levy).
Added support for the %z format specifier in the formatDateTime function to format timezone offsets.

Why it matters

This feature addresses the need to include timezone offset information when formatting date and time values. It enhances the flexibility and accuracy of date-time representations, especially useful for applications that require explicit timezone offset display.

How to use it

Users can include the %z specifier within the format string argument of the formatDateTime function to output the timezone offset in the formatted date-time string. For example:

SELECT formatDateTime(now(), '%Y-%m-%d %H:%M:%S %z')