I am receiving a datetime in YYYY-MM-DDThh:mm:ss[.S+][Z|+-hh:mm] this format. and i m trying to copy that value using strptime
as shown below
struct tm time = {0};
char *pEnd = strptime(datetime, "%Y-%m-%dT%H:%M:%S%Z", &time);
But I can't copy the fraction of seconds as strptime
doesn't support it in C++.
So what should i do?
I found a solution using gettimeofday()
. but I am already getting date and time in 'datetime' so please help me to find soluntion for it...I can use poco also . but even their we take local time.