DosSetDateTime

DosSetDateTime sets the current date and time for the system. Although you can set day, month, year and weekday to whatever you want, DosSetDateTime will check if it is a correct combination and will return an error if it is incorrect.

Syntax
DosSetDateTime( pdt )

Parameters

 * PDATETIME pdt (input): The pointer to a DATETIME structure containing the date and time to be set as the system's date and time.

Returns

 * APIRET rc
 * 0  NO_ERROR
 * 327 ERROR_TS_DATETIME

Gotchas
The sign of the time zone is opposed to that ordinarily used. I.e. GMT+1 (Western Europe) <=> -60

Alternative Version

 * 1) OS2Linux project (Common Public License) created a clone for this function.