Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion implot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ ImPlotTime MkGmtTime(struct tm *ptm) {
#ifdef _WIN32
t.S = _mkgmtime(ptm);
#else
t.S = timegm(ptm);
t.S = mktime(ptm);
#endif
if (t.S < 0)
t.S = 0;
Expand All @@ -923,6 +923,8 @@ tm* GetGmtTime(const ImPlotTime& t, tm* ptm)
return ptm;
else
return nullptr;
#elif defined(__STDC_WANT_LIB_EXT1__)
return gmtime_s(&t.S, ptm);
#else
return gmtime_r(&t.S, ptm);
#endif
Expand All @@ -942,6 +944,8 @@ tm* GetLocTime(const ImPlotTime& t, tm* ptm) {
return ptm;
else
return nullptr;
#elif defined(__STDC_WANT_LIB_EXT1__)
return localtime_s(&t.S, ptm);
#else
return localtime_r(&t.S, ptm);
#endif
Expand Down