v.21.6Improvement

Keep Default Timezone on DateTime Operations

Keep default timezone on DateTime operations if it was not provided explicitly. For example, if you add one second to a value of DateTime type without timezone it will remain DateTime without timezone. In previous versions the value of default timezone was placed to the returned data type explicitly so it becomes DateTime('something'). This closes #4854. #23392 (alexey-milovidov).
Preserve the default timezone on DateTime operations when no explicit timezone is provided.

Why it matters

This feature ensures that operations on DateTime values without an explicit timezone do not forcibly convert the result to a default timezone. Previously, adding time to a DateTime without timezone would implicitly assign the default timezone, changing the data type to DateTime('default_timezone'). Now, the original timezone-less type is preserved, preventing unexpected type changes and improving consistency in time calculations.

How to use it

No explicit action is needed to enable this behavior. Users performing operations on DateTime columns without an explicit timezone will automatically benefit from the preservation of the original timezone-less type.