Skip to content

Instantly share code, notes, and snippets.

@btbytes btbytes/sandbox.c
Created Jan 8, 2010

Embed
What would you like to do?
#include <stdio.h>
#include <time.h>
#define SIZE 256
int
main(int argc, char* argv[])
{
time_t curtime;
struct tm *gtime;
char buffer[SIZE];
curtime = time(NULL);
gtime = gmtime(&curtime);
printf("GMT time in standard format: ");
fputs(asctime(gtime), stdout);
strftime(buffer, SIZE, "\nGMT time in ISO format : %Y-%m-%dT%H:%M:%S\n", gtime);
fputs(buffer, stdout);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.