I am trying to format my time stamp in ISO 8601 with microseconds in C. Like this 2014-11-06T10:34:47.123456Z, but I cant seem to get microseconds. Any help would be greatful.
#pragma warning(disable:4996)
#define _CRT_SECURE_NO_WARNING
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#define SIZE 256
int
main(void)
{
char buffer[SIZE];
time_t curtime;
/* Get the current time. */
curtime = time(NULL);
strftime(buffer, sizeof buffer, "ISO 8601 %Y-%m-%dT%H:%M:%S\n", gmtime(&curtime));
fputs(buffer, stdout);
getchar();
return 0;
}