Sets the system date
SetDate( <dDate>, [<lMode>] ) --> lSet
<dDate> Designates which date to use to set the system date.
<lMode> Designates whether the date should also be set in the CMOS- RAM of an AT. The default is do not write (.F.). Note that in Windows plataform this adjust is automatic, therefore this parameter is without efect.
SetDate() RETURNs .T. when the date is successfully set.
When you use this FUNCTION to set the system date from within your xHarbour application, all files acquire this date with each write procedure.
Set the system date in each case; but the hardware clock only on an AT: dNewDate := SToD( "19910730" ) IF ISAT() SetDate( dNewDate, .T. ) ELSE SetDate( dNewDate ) ENDIF Or, more compactly: SetDate( dNewDate, ISAT() )
This function is CA-Cl*pper Tools compatible.
Source is dattime3.c, library is libct.