From c1f9fcc3d5b067f54c37a962bdf8c0114297e694 Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Wed, 9 Oct 2019 22:53:57 +0300 Subject: [PATCH] Fixed getting function default timezone value from DateTime64-argument --- dbms/src/Functions/extractTimeZoneFromFunctionArguments.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbms/src/Functions/extractTimeZoneFromFunctionArguments.cpp b/dbms/src/Functions/extractTimeZoneFromFunctionArguments.cpp index 4190cfe797f..be5d69e190d 100644 --- a/dbms/src/Functions/extractTimeZoneFromFunctionArguments.cpp +++ b/dbms/src/Functions/extractTimeZoneFromFunctionArguments.cpp @@ -43,6 +43,8 @@ std::string extractTimeZoneNameFromFunctionArguments(const ColumnsWithTypeAndNam /// If time zone is attached to an argument of type DateTime. if (const DataTypeDateTime * type = checkAndGetDataType(arguments[datetime_arg_num].type.get())) return type->getTimeZone().getTimeZone(); + if (const DataTypeDateTime64 * type = checkAndGetDataType(arguments[datetime_arg_num].type.get())) + return type->getTimeZone().getTimeZone(); return {}; }