This commit is contained in:
zvonand 2023-02-27 14:38:15 +01:00
parent a69425326d
commit f3e19144d8
3 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,7 @@
#include <Interpreters/InterpreterTransactionControlQuery.h>
#include <Interpreters/NormalizeSelectWithUnionQueryVisitor.h>
#include <Interpreters/OpenTelemetrySpanLog.h>
#include <Interpreters/OpenTelemetrySpanLog.h>
#include <Interpreters/ProcessList.h>
#include <Interpreters/ProcessorsProfileLog.h>
#include <Interpreters/QueryLog.h>
@ -1279,7 +1280,7 @@ void executeQuery(
QueryResultDetails result_details
{
.query_id = context->getClientInfo().current_query_id,
.timezone = DateLUT::instance().getTimeZone(),
.timezone = DateLUT::instance("").getTimeZone(),
};
std::unique_ptr<WriteBuffer> compressed_buffer;

View File

@ -22,7 +22,7 @@ void OwnPatternFormatter::formatExtended(const DB::ExtendedLogMessage & msg_ext,
const Poco::Message & msg = msg_ext.base;
/// Change delimiters in date for compatibility with old logs.
DB::writeDateTimeText<'.', ':'>(msg_ext.time_seconds, wb);
DB::writeDateTimeText<'.', ':'>(msg_ext.time_seconds, wb, server_timezone);
DB::writeChar('.', wb);
DB::writeChar('0' + ((msg_ext.time_microseconds / 100000) % 10), wb);

View File

@ -2,6 +2,7 @@
#include <Poco/PatternFormatter.h>
#include <Common/DateLUT.h>
#include "ExtendedLogChannel.h"
@ -30,5 +31,6 @@ public:
virtual void formatExtended(const DB::ExtendedLogMessage & msg_ext, std::string & text) const;
private:
const DateLUTImpl & server_timezone = DateLUT::instance("");
bool color;
};