MCPcopy Create free account
hub / github.com/crownengine/crown / date

Function date

src/core/date.cpp:22–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace date
21{
22 void date(Date &date)
23 {
24#if CROWN_PLATFORM_WINDOWS
25 SYSTEMTIME now;
26 GetLocalTime(&now);
27 date.year = now.wYear;
28 date.month = now.wMonth;
29 date.day = now.wDay;
30#else
31 time_t t;
32 struct tm now;
33 ::time(&t);
34 localtime_r(&t, &now);
35 date.year = now.tm_year + 1900;
36 date.month = now.tm_mon + 1;
37 date.day = now.tm_mday;
38#endif
39 }
40
41 void utc_date(Date &date)
42 {

Callers 1

expandFunction · 0.85

Calls 1

timeFunction · 0.70

Tested by

no test coverage detected