RaspberrPi project source code
guowenxue
2024-03-12 cbbab621e5e5d3b1407bd898544ab8b7487563a3
project/socketd/booster/packet.c
@@ -40,7 +40,6 @@
        return -1;
    }
    time_t now = time(NULL);
    localtime_r(&now, ptm);
@@ -59,10 +58,9 @@
    }
    ptm = &pack_info->sample_time;
    snprintf(strtime, sizeof(strtime), "%04d-%02d-%2d %02d:%02d:%02d",
    snprintf(strtime, sizeof(strtime), "%04d-%02d-%02d %02d:%02d:%02d",
            ptm->tm_year+1900, ptm->tm_mon+1, ptm->tm_mday,
            ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
    memset(pack_buf, 0, size);
    snprintf(pack_buf, size, "%s|%s|%.3f", pack_info->devid, strtime, pack_info->temper);