Update the time format according to the standard

This commit is contained in:
Amin Ben Ramdhane 2020-03-16 23:29:02 +01:00
parent 65f38dccb1
commit ce8bf4e319
2 changed files with 2 additions and 7 deletions

View file

@ -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";

View file

@ -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;
}