#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int
main(int argc, char *argv[])
{
char outstr[200];
time_t t;
struct tm *tmp;
t = time(NULL);
tmp = localtime(&t);
if (tmp == NULL) {
perror("localtime");
exit(EXIT_FAILURE);
}
strftime(outstr,sizeof(outstr),"%Y:%m:%d",tmp);
puts(outstr);
strcat(outstr,".xml");
puts(outstr);
} /* main */
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int
main(int argc, char *argv[])
{
char outstr[200];
time_t t;
struct tm *tmp;
t = time(NULL);
tmp = localtime(&t);
if (tmp == NULL) {
perror("localtime");
exit(EXIT_FAILURE);
}
strftime(outstr,sizeof(outstr),"%Y:%m:%d",tmp);
puts(outstr);
strcat(outstr,".xml");
puts(outstr);
} /* main */