Skip to content

Commit 4653bb1

Browse files
committed
Use millisecond timestamps in responses
1 parent 3e08ec2 commit 4653bb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/commands/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ cJSON* build_json_response_object(switch_bool_t success, const char *message) {
3333
cJSON_AddBoolToObject(json, "success", success);
3434
cJSON_AddStringToObject(json, "status", success ? "success" : "error");
3535
cJSON_AddStringToObject(json, "message", message ? message : "");
36-
cJSON_AddNumberToObject(json, "timestamp", (double)switch_time_now());
36+
double timestamp_ms = (double)switch_time_now() / 1000.0;
37+
cJSON_AddNumberToObject(json, "timestamp", timestamp_ms);
3738

3839
if (globals.node_id && strlen(globals.node_id) > 0) {
3940
cJSON_AddStringToObject(json, "node_id", globals.node_id);

0 commit comments

Comments
 (0)