mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Update tzdata to 2024a
This commit is contained in:
parent
017a81692f
commit
7a851bece3
2
contrib/cctz
vendored
2
contrib/cctz
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8529bcef5cd996b7c0f4d7475286b76b5d126c4c
|
Subproject commit 7918cb7afe82e53428e39a045a437fdfd4f3df47
|
@ -8,7 +8,9 @@
|
|||||||
#include <IO/ReadHelpers.h>
|
#include <IO/ReadHelpers.h>
|
||||||
#include <IO/ReadBufferFromString.h>
|
#include <IO/ReadBufferFromString.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
|
#include <cctz/time_zone.h>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -544,6 +546,13 @@ void SettingFieldTimezone::readBinary(ReadBuffer & in)
|
|||||||
*this = std::move(str);
|
*this = std::move(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingFieldTimezone::validateTimezone(const std::string & tz_str)
|
||||||
|
{
|
||||||
|
cctz::time_zone validated_tz;
|
||||||
|
if (!tz_str.empty() && !cctz::load_time_zone(tz_str, &validated_tz))
|
||||||
|
throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Invalid time zone: {}", tz_str);
|
||||||
|
}
|
||||||
|
|
||||||
String SettingFieldCustom::toString() const
|
String SettingFieldCustom::toString() const
|
||||||
{
|
{
|
||||||
return value.dump();
|
return value.dump();
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include <Core/Field.h>
|
#include <Core/Field.h>
|
||||||
#include <Core/MultiEnum.h>
|
#include <Core/MultiEnum.h>
|
||||||
#include <boost/range/adaptor/map.hpp>
|
#include <boost/range/adaptor/map.hpp>
|
||||||
#include <cctz/time_zone.h>
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
@ -608,12 +607,7 @@ struct SettingFieldTimezone
|
|||||||
void readBinary(ReadBuffer & in);
|
void readBinary(ReadBuffer & in);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void validateTimezone(const std::string & tz_str)
|
void validateTimezone(const std::string & tz_str);
|
||||||
{
|
|
||||||
cctz::time_zone validated_tz;
|
|
||||||
if (!tz_str.empty() && !cctz::load_time_zone(tz_str, &validated_tz))
|
|
||||||
throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Invalid time zone: {}", tz_str);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Can keep a value of any type. Used for user-defined settings.
|
/// Can keep a value of any type. Used for user-defined settings.
|
||||||
|
Loading…
Reference in New Issue
Block a user