After I upgraded to last master today (from an old version from sept 2018) I see at least on OSX that even if in config.xml I have <timezone>UTC</timezone> the server is using the system timezone which is Europe/Bucharest.
This can be tested as well using SELECT timezone()
Anything changed config wise in the last time ?
Silviu
I found the problem:
When setting the value from config we have:
/// This must be done before any usage of DateLUT. In particular, before any logging.
if (config().has("timezone"))
{
if (0 != setenv("TZ", config().getString("timezone").data(), 1))
throw Poco::Exception("Cannot setenv TZ variable");
tzset();
}
As comment says this should execute before any DateLUT is created. But adding a fprintf in this place and in DateLut config indicates that DateLut is created first and then this code is executed.
Didn't found yet where is created. I'll dig more.
Seems the above condition get broken on the ParquetBlockInputStream.cpp line 262 where creating this global variable
const std::unordered_map<arrow::Type::type, std::shared_ptr<IDataType>> arrow_type_to_internal_type = {
...
{arrow::Type::DATE64, std::make_shared<DataTypeDateTime>()},
{arrow::Type::TIMESTAMP, std::make_shared<DataTypeDateTime>()},
//{arrow::Type::TIME32, std::make_shared<DataTypeDateTime>()},
...
};
Makes DateLUT to be initialized before the above statement is executed.
We ran into the same issue which broke nearly everything for use because it all depends on the timezone. It would be great if this could be resolved and rolled out very soon.
Building with -DENABLE_PARQUET=0 can be used as workaround
Thank you @proller
Any chance for a hotfix release?
Latest release still has the issue.
$ clickhouse-client
ClickHouse client version 19.4.2.7.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 19.4.2 revision 54416.
xxx :) SELECT timezone()
SELECT timezone()
ββtimezone()βββββββββ
β Europe/Berlin β
βββββββββββββββββββββ
As a temporary fix you can set a specific timezone in the environment. Add the following lines with systemctl edit clickhouse-server.service and restart the server:
[Service]
Environment=TZ=UTC
Have this problem too on 19.4.3 revision 54416
https://github.com/yandex/ClickHouse/pull/4718 was merged
In release: https://github.com/yandex/ClickHouse/blob/master/CHANGELOG.md#clickhouse-release-19526-2019-04-15
Most helpful comment
Thank you @proller
Any chance for a hotfix release?