Can someone help me with this program.I had found that the output of this program should be the local time and display time and date and i dont know where my program gone wrong and display like this
time is 03:29:30
date08/06/108
how to eliminate 1 from my program.it should be "date 08/06/08"..please help me..
#include<stdio.h>
#include<time.h>
int main(void)
{
struct tm *systime;
time_t t;
t=time(NULL);
systime = localtime(&t);
printf("time is %.2d:%.2d:%.2d\n",systime->tm_hour,systime->tm_min,systime->tm_sec);
printf("Date:%.2d/%.2d/%.2d",systime->tm_mon+1,
systime->tm_mday,systime->tm_year);
return 0;
}