MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetDateLocal

Function GetDateLocal

src/openrct2/platform/Platform.Common.cpp:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 RealWorldDate GetDateLocal()
70 {
71 auto time = std::time(nullptr);
72 auto localTime = std::localtime(&time);
73
74 RealWorldDate outDate;
75 outDate.day = localTime->tm_mday;
76 outDate.day_of_week = localTime->tm_wday;
77 outDate.month = localTime->tm_mon + 1;
78 outDate.year = localTime->tm_year + 1900;
79 return outDate;
80 }
81
82 RealWorldTime GetTimeLocal()
83 {

Callers 2

GameAutosaveFunction · 0.85
ScreenshotGetDateTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected