I teste with this code, it works fine for me
#include <stdio.h>
#include <string.h>
int main() {
char string[] = {"0001-01-01T17:45:33\0"};
char *temp;
temp = strchr(string, 'T') ;
*temp= ' ';
printf("%s\n", temp);
printf("%s\n", string);
}
2
solved convert an ISO8601 timestamp with C code [duplicate]