hi!
well i had been able to figure out how to get time and date...
#include <time.h>
#include <stdio.h>
#define SIZE 256
int
main (void)
{
char buffer1[SIZE];
char buffer2[SIZE];
time_t curtime;
struct tm *loctime;
/* Get the current time. */
curtime = time (NULL);
/* Convert it to local time representation. */
loctime = localtime (&curtime);
/* Print out the date and time in the standard format. */
fputs (asctime (loctime), stdout);
/* Print it out in a nice format. */
strftime (buffer1, SIZE, " %x\n", loctime);
printf("date: %s\n",buffer1);
strftime (buffer2, SIZE, "%X", loctime);
printf("time: %s\n",buffer2);
return 0;
}
but now wat i want to do is subtract 5 minutes from the current time...and get the new time..in same format..
can anybody suggest how a can do this?
regards
