mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-10 15:52:12 +00:00
Attempt to fix unix time get
This commit is contained in:
parent
582656be7b
commit
c40d902cef
@ -162,7 +162,13 @@ int InterpreterLog(const string& logText)
|
||||
|
||||
tm bt{};
|
||||
#if UNIX
|
||||
//localtime_r(&timer, &bt);
|
||||
time_t currentTime;
|
||||
struct tm* localTime;
|
||||
time(¤tTime);
|
||||
localTime = localtime(&utc);
|
||||
Hour = localTime->tm_hour;
|
||||
Min = localTime->tm_min;
|
||||
Sec = localTime->tm_sec;
|
||||
#elif WINDOWS
|
||||
localtime_s(&bt, &timer);
|
||||
Hour = bt.tm_hour;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user