in src/mqtt_client.c [242:267]
static void getLogTime(char* timeResult, size_t len)
{
if (timeResult != NULL)
{
time_t agent_time = get_time(NULL);
if (agent_time == (time_t)-1)
{
timeResult[0] = '\0';
}
else
{
struct tm* tmInfo = localtime(&agent_time);
if (tmInfo == NULL)
{
timeResult[0] = '\0';
}
else
{
if (strftime(timeResult, len, "%H:%M:%S", tmInfo) == 0)
{
timeResult[0] = '\0';
}
}
}
}
}