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

Function GetDateStart

util/draft/date.cpp:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <util/datetime/base.h>
6
7time_t GetDateStart(time_t ts) {
8 tm dateTm;
9 memset(&dateTm, 0, sizeof(tm));
10 localtime_r(&ts, &dateTm);
11
12 dateTm.tm_isdst = -1;
13
14 dateTm.tm_sec = 0;
15 dateTm.tm_min = 0;
16 dateTm.tm_hour = 0;
17 return mktime(&dateTm);
18}
19
20static time_t ParseDate(const char* date, const char* format) {
21 tm dateTm;

Callers 2

TDateClass · 0.85
TDateMethod · 0.85

Calls 1

localtime_rFunction · 0.85

Tested by

no test coverage detected