home *** CD-ROM | disk | FTP | other *** search
- #include <time.h>
-
- char timestr[] = "Xyz 00 00:00 0000";
-
- char *months[12] = {
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- };
-
- char *tod()
- {
- TIME ct;
- DATE cd;
-
- date(&cd);
- time(&ct);
-
- sprintf(timestr,"%s %02d %02d:%02d %04d",
- months[cd.month-1],cd.day,ct.hours,ct.mins,cd.year);
- return timestr;
- }
-
-