mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
TR104: convert CallLog.{i}.Start to ISO 8601 date-time format
This commit is contained in:
parent
91879726a6
commit
001b7800ee
1 changed files with 2 additions and 0 deletions
|
|
@ -249,6 +249,8 @@ int init_call_log()
|
|||
time_start = mktime(&tm_start);
|
||||
time_end = mktime(&tm_end);
|
||||
snprintf(cdr.duration, sizeof(cdr.duration), "%u", (unsigned int)(time_end - time_start));
|
||||
// Convert start time to ISO 8601 date-time format as per TR-181 data model
|
||||
strftime(cdr.start_time, sizeof(cdr.start_time), "%Y-%m-%dT%H:%M:%SZ", &tm_start);
|
||||
} else {
|
||||
TR104_DEBUG("Invalid CDR: [%s]\nWrong start time and/or end time, [%s], [%s]\n",
|
||||
line, cdr.start_time, end_time);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue