MCPcopy Create free account
hub / github.com/catboost/catboost / ToTimeT

Method ToTimeT

util/datetime/parser.h:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 }
259
260 time_t ToTimeT(time_t defaultValue) const {
261 if (!IsOk()) {
262 return defaultValue;
263 }
264 struct tm tm;
265 Zero(tm);
266 tm.tm_year = Year - 1900;
267 tm.tm_mon = Month - 1;
268 tm.tm_mday = Day;
269 tm.tm_hour = Hour;
270 tm.tm_min = Minute;
271 tm.tm_sec = Second;
272 time_t tt = TimeGM(&tm);
273 if (tt == -1) {
274 return defaultValue;
275 }
276 return tt - ZoneOffsetMinutes * 60;
277 }
278};
279
280class TDateTimeParserBaseDeprecated {

Callers

nothing calls this directly

Calls 3

IsOkFunction · 0.85
ZeroFunction · 0.85
TimeGMFunction · 0.85

Tested by

no test coverage detected