Summary of all changes to date handling (including date/time/timezone conversion functions) from the 2025 changelog.
TimeandTime64data types are now production ready;enable_time_time64_typeis enabled by default. #89345 — changelog line 68
- PREWHERE bugs involving supertypes for
TimeandTime64data types fixed. #84715 — changelog line 159 - Fix inference of bad
DateTime64values from Strings in text formats. #90013 — changelog line 174 TimeandTime64now respect timezones correctly when converting fromDateTimeandDateTime64(shows time in the same timezone as the user's DateTime view). #90310 — changelog line 191- Fix bug where
SELECT CAST(CAST(now(), 'Time'), 'Time64')produced incorrect result. #90324 — changelog line 192 - Fix
toDateTimeOrNullof a negative argument incorrectly returning NULL. #90490 — changelog line 202 - Fix possible logical error during output of
LowCardinality(Date32)in Arrow format. #90505 — changelog line 203 - Fix overflow while reading from ORC format for
DateandDateTime64types. #91572 — changelog line 261
- Escape filenames for
Varianttype subcolumns in Wide data parts. Fixes storing types with special symbols inside Variant (likeDateTimewith a specific timezone containing\). #87300 — changelog line 300 - Parquet no-timezone timestamps (
isAdjustedToUTC=false) are now read asDateTime64(..., 'UTC')instead ofDateTime64(...). Useinput_format_parquet_local_time_as_utc = 0for old behavior. #87872 — changelog line 305
- (backport) Fix inference of bad
DateTime64values from Strings in text formats. #90013 — changelog line 510
- Fixed incorrect handling of pre-epoch dates with fractional seconds in
parseDateTime64BestEffort,change{Year,Month,Day}, andmakeDateTime64. Previously the subsecond part was subtracted from seconds instead of added. E.g.parseDateTime64BestEffort('1969-01-01 00:00:00.468')returned1968-12-31 23:59:59.532instead of1969-01-01 00:00:00.468. #85396 — changelog line 684 - Fix inferring
Date/DateTime/DateTime64on dates that are out of supported range. #86184 — changelog line 686 - Makes
toDateandtoDate32behave the same for all numeric types. FixesDate32underflow check during cast fromint16. #87176 — changelog line 695 - Fix handling of
timestamp/timestamptzcolumns in Glue catalog. #87733 — changelog line 725 - Fix incorrect granules/partitions elimination for datetime-based keys when using
session_timezonesetting in queries. #87987 — changelog line 737 - Fix UBSAN integer overflow in
accurateCasterror message when converting large values toDateTime. #88520 — changelog line 765 - Fix bug where converting
DateTime64toDatewithdate_time_overflow_behavior = 'saturate'could lead to incorrect results for out-of-range values when working with time zones. #88737 — changelog line 775
- Disable nonsensical binary operations with IPv4/IPv6 — disallows operations with floating types that
previously threw logical errors with some types (such as
DateTime). #86336 — changelog line 797
- Aggregate functions
timeSeriesChangesToGridandtimeSeriesResetsToGrid(PromQLchanges/resetsequivalents using timestamp grids). #86010 — changelog line 818
- It's no longer possible to specify time zones for the
Timetype (it didn't make sense). #84689 — changelog line 852 - Simplified (and avoided some bugs) logic related to parsing
Time/Time64in thebest_effortmode. #84730 — changelog line 853 - Make the staleness window in
timeSeries*()functions left-open and right-closed. #86588 — changelog line 867 - Enable short circuit evaluation for
parseDateTimefunction. #87184 — changelog line 883
- Fix function
timeSeriesResampleToGridWithStaleness()when the first bucket has no value. #86507 — changelog line 930 - Fix
TimeSeriesengine table breaking creation of new replica in Replicated Database. #86845 — changelog line 949 - Fix date field populating in
system.iceberg_metadata_logtable. #86961 — changelog line 954
- Added function
dateTimeToUUIDv7to convert a DateTime value to a UUIDv7. #84319 — changelog line 1034 timeSeriesDerivToGridandtimeSeriesPredictLinearToGridaggregate functions (PromQLderiv/predict_linearequivalents). #84328 — changelog line 1035- New TimeSeries functions:
timeSeriesRange(start_timestamp, end_timestamp, step)andtimeSeriesFromGrid(start_timestamp, end_timestamp, step, values). #85435 — changelog line 1036
- You can now use
TimeandTime64types inside the JSON type. #83784 — changelog line 1104
- Overflow large values (>2106-02-07) when casting from
DatetoDateTime64is fixed. #83982 — changelog line 1189