mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge branch 'utc-fallback-no-tzdata' into date-lut-fix-uct
This commit is contained in:
commit
97a502fcb6
@ -23,6 +23,7 @@ Poco::DigestEngine::Digest calcSHA1(const std::string & path)
|
||||
return digest_engine.digest();
|
||||
}
|
||||
|
||||
|
||||
std::string determineDefaultTimeZone()
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
@ -53,6 +54,10 @@ std::string determineDefaultTimeZone()
|
||||
error_prefix = "Could not determine local time zone: ";
|
||||
tz_file_path = "/etc/localtime";
|
||||
|
||||
/// No TZ variable and no tzdata installed (e.g. Docker)
|
||||
if (!fs::exists(tz_file_path))
|
||||
return "UTC";
|
||||
|
||||
/// Read symlink but not transitive.
|
||||
/// Example:
|
||||
/// /etc/localtime -> /usr/share/zoneinfo//UTC
|
||||
|
Loading…
Reference in New Issue
Block a user