#include <dos.h> unsigned int _dos_setdate(struct dosdate_t *date);
This function sets the current date. The dosdate_t structure is as follows:
struct dosdate_t { unsigned char day; /* 1-31 */ unsigned char month; /* 1-12 */ unsigned short year; /* 1980-2099 */ unsigned char dayofweek; /* 0-6, 0=Sunday */ };
dayofweek field has no effect at this function call.
See section _dos_getdate. See section _dos_gettime. See section _dos_settime.
Returns 0 if successful and non-zero on error (and sets errno=EINVAL).
not ANSI, not POSIX
struct dosdate_t date; date->year = 1999; date->month = 12; date->day = 31; if ( !_dos_setdate(&date) ) puts("It was a valid date.");
Go to the first, previous, next, last section, table of contents.