MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / createTm

Function createTm

libminifi/test/unit/TimeUtilTests.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 constexpr int ONE_DAY = 24 * ONE_HOUR;
24
25 struct tm createTm(int year, int month, int day, int hour, int minute, int second, bool is_dst = false) {
26 struct tm date_time;
27 date_time.tm_year = year - 1900;
28 date_time.tm_mon = month - 1;
29 date_time.tm_mday = day;
30 date_time.tm_hour = hour;
31 date_time.tm_min = minute;
32 date_time.tm_sec = second;
33 date_time.tm_isdst = is_dst ? 1 : 0;
34 return date_time;
35 }
36
37 void mkgmtimeTestHelper(time_t expected, int year, int month, int day, int hour, int minute, int second) {
38 using org::apache::nifi::minifi::utils::timeutils::mkgmtime;

Callers 1

mkgmtimeTestHelperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected