replace gmtime with gmtime_r

This commit is contained in:
Thomas Kunze 2020-10-28 22:45:35 +01:00
parent edb9b6b526
commit 87a495bf7a

View File

@ -522,8 +522,9 @@ struct tm KNXValue::timeValue() const
case StringType: case StringType:
{ {
time_t timeVal = ulongValue(); time_t timeVal = ulongValue();
struct tm* timePtr = gmtime(&timeVal); struct tm timeStruct;
return *timePtr; gmtime_r(&timeVal, &timeStruct);
return timeStruct;
} }
} }
struct tm tmp = {0}; struct tm tmp = {0};