mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-11 16:22: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{};
|
tm bt{};
|
||||||
#if UNIX
|
#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
|
#elif WINDOWS
|
||||||
localtime_s(&bt, &timer);
|
localtime_s(&bt, &timer);
|
||||||
Hour = bt.tm_hour;
|
Hour = bt.tm_hour;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user