From ce8bf4e319cb6ca795111efda5b3cca70e8ecd09 Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Mon, 16 Mar 2020 23:29:02 +0100 Subject: [PATCH] Update the time format according to the standard --- dmtree/tr181/userinterface.c | 2 +- libbbf_api/dmcommon.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dmtree/tr181/userinterface.c b/dmtree/tr181/userinterface.c index 012fa068..8178af72 100644 --- a/dmtree/tr181/userinterface.c +++ b/dmtree/tr181/userinterface.c @@ -135,7 +135,7 @@ static int get_userint_remoteaccesss_supportedprotocols(char *refparam, struct d { int found = get_supportedprotocols(); if (found) { - *value = "HTTP, HTTPS"; + *value = "HTTP,HTTPS"; return 0; } *value = "HTTP"; diff --git a/libbbf_api/dmcommon.c b/libbbf_api/dmcommon.c index eec52df6..3be74938 100644 --- a/libbbf_api/dmcommon.c +++ b/libbbf_api/dmcommon.c @@ -1708,14 +1708,9 @@ int dm_time_format(time_t ts, char **dst) if (t_tm == NULL) return -1; - if(strftime(time_buf, sizeof(time_buf), "%FT%T%z", t_tm) == 0) + if(strftime(time_buf, sizeof(time_buf), "%Y-%m-%dT%H:%M:%SZ", t_tm) == 0) return -1; - time_buf[25] = time_buf[24]; - time_buf[24] = time_buf[23]; - time_buf[22] = ':'; - time_buf[26] = '\0'; - *dst = dmstrdup(time_buf); return 0; }