/*time functions*/

#include <time.h>

ogettime(
char *weekday,
char *month,
int *monthday,
int *hour,
int *minute,
int *second,
int *year
)
{
unsigned long int I;
char *datestring;

time(&I);/*sets unsigned long int I to seconds since start 1970*/
datestring=ctime(&I);/*char *   converts I to character string date and time*/

/*printf("\n%s\n",datestring);*/

sscanf(datestring,"%s %s %d %d:%d:%d %d",\
weekday,month,monthday,hour,minute,second,year);/*no &, already pointers*/

/*printf("\nweekday=%s\n",weekday);
/*printf("\nmonth=%s\n",month);
/*printf("\nmonthday=%d\n",*monthday);
/*printf("\nhour=%d\n",*hour);
/*printf("\nminute=%d\n",*minute);
/*printf("\nsecond=%d\n",*second);
/*printf("\nyear=%d\n",*year);*/

return(1);
}


