MCPcopy Create free account
hub / github.com/ByConity/ByConity / getTimeFromString

Function getTimeFromString

src/Statistics/AutoStatisticsHelper.cpp:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101std::optional<Time> getTimeFromString(const String & text)
102{
103 struct std::tm tmp;
104 std::istringstream ss(text);
105 ss >> std::get_time(&tmp, "%H:%M");
106 if (ss.fail())
107 {
108 return std::nullopt;
109 }
110 return DateLUT::serverTimezoneInstance().toTime(DateLUT::serverTimezoneInstance().makeDateTime(1971, 1, 1, tmp.tm_hour, tmp.tm_min, 0));
111}
112
113
114std::optional<double> calcPriority(const InternalConfig & cfg, UInt64 total_udi, UInt64 table_row_count)

Callers 1

parseTimeWindowFunction · 0.85

Calls 3

failMethod · 0.80
toTimeMethod · 0.80
makeDateTimeMethod · 0.80

Tested by

no test coverage detected