Merge pull request #87 from blackwhite084/patch-1
Update data_template_event.c
This commit is contained in:
@@ -305,7 +305,7 @@ static int _iot_construct_event_json(void *handle, char *jsonBuffer, size_t size
|
|||||||
}else{ //single
|
}else{ //single
|
||||||
sEvent *pEvent = pEventArry[0];
|
sEvent *pEvent = pEventArry[0];
|
||||||
if(0 == pEvent->timestamp){ //no accurate UTC time, set 0
|
if(0 == pEvent->timestamp){ //no accurate UTC time, set 0
|
||||||
rc_of_snprintf = HAL_Snprintf(jsonBuffer + strlen(jsonBuffer), remain_size, "{\"eventId\":\"%s\", \"type\":\"%s\", \"timestamp\":0, \"params\":{",\
|
rc_of_snprintf = HAL_Snprintf(jsonBuffer + strlen(jsonBuffer), remain_size, "\"eventId\":\"%s\", \"type\":\"%s\", \"timestamp\":0, \"params\":{",\
|
||||||
pEvent->event_name, pEvent->type);
|
pEvent->event_name, pEvent->type);
|
||||||
}else{ // accurate UTC time is second,change to ms
|
}else{ // accurate UTC time is second,change to ms
|
||||||
rc_of_snprintf = HAL_Snprintf(jsonBuffer + strlen(jsonBuffer), remain_size, "\"eventId\":\"%s\", \"type\":\"%s\", \"timestamp\":%u000, \"params\":{",\
|
rc_of_snprintf = HAL_Snprintf(jsonBuffer + strlen(jsonBuffer), remain_size, "\"eventId\":\"%s\", \"type\":\"%s\", \"timestamp\":%u000, \"params\":{",\
|
||||||
|
Reference in New Issue
Block a user