From c40d902cef1e93a0b334168f179bc32976817dc3 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Fri, 27 May 2022 19:51:25 -0400 Subject: [PATCH] Attempt to fix unix time get --- ZSharp/builtin.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ZSharp/builtin.h b/ZSharp/builtin.h index b43a5b0..2e616c8 100644 --- a/ZSharp/builtin.h +++ b/ZSharp/builtin.h @@ -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;