mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix error
This commit is contained in:
parent
d406999e8f
commit
8271cec093
@ -112,9 +112,7 @@ DateLUTImpl::DateLUTImpl(const std::string & time_zone_)
|
||||
/// Change in time zone without transition is possible, e.g. Moscow 1991 Sun, 31 Mar, 02:00 MSK to EEST
|
||||
cctz::time_zone::civil_transition transition{};
|
||||
if (cctz_time_zone.next_transition(start_of_day_time_point - std::chrono::seconds(1), &transition)
|
||||
&& transition.from.year() == date.year()
|
||||
&& transition.from.month() == date.month()
|
||||
&& transition.from.day() == date.day()
|
||||
&& (cctz::civil_day(transition.from) == date || cctz::civil_day(transition.to) == date)
|
||||
&& transition.from != transition.to)
|
||||
{
|
||||
values.time_at_offset_change_value = (transition.from - cctz::civil_second(date)) / Values::OffsetChangeFactor;
|
||||
|
@ -416,11 +416,11 @@ TEST_P(DateLUTWithTimeZoneAndTimeRange, InRange)
|
||||
has_transition = true;
|
||||
}
|
||||
|
||||
if (has_transition && (transition.from.second() != 0 || transition.from.minute() % 900 != 0))
|
||||
if (has_transition && (transition.from.second() != 0 || transition.from.minute() % 15 != 0))
|
||||
{
|
||||
std::cerr << "Skipping " << timezone_name << " " << tz_time
|
||||
<< " because of unsupported timezone transition from " << transition.from << " to " << transition.to
|
||||
<< " (not divisable by 15 minutes)\n";
|
||||
<< " (not divisible by 15 minutes)\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -436,8 +436,7 @@ TEST_P(DateLUTWithTimeZoneAndTimeRange, InRange)
|
||||
|
||||
/// To large transition.
|
||||
if (has_transition
|
||||
&& cctz::civil_day(transition.from) != cctz::civil_day(transition.to)
|
||||
&& cctz::civil_day(transition.from) != cctz::civil_day(transition.to) + 1)
|
||||
&& std::abs(transition.from - transition.to) > 3600 * 3)
|
||||
{
|
||||
std::cerr << "Skipping " << timezone_name << " " << tz_time
|
||||
<< " because of unsupported timezone transition from " << transition.from << " to " << transition.to
|
||||
|
Loading…
Reference in New Issue
Block a user