Viva Clipper !

SetTime()

Advertisements

SetTime()

Sets the system clock

Syntax

      SetTime( <cTime>, [<lMode>] ) --> lSet

Arguments

<cTime> Designates a character string that contains the time that is to become the system time.

<lMode> Designates whether the time should also be set in the CMOS-RAM of an AT. The default is do not write to CMOS-RAM. Note that in Windows platform this adjust is automatic, therefore this parameter is without efect.

Returns

The FUNCTION RETURNs .T. when the time is set successfully.

Description

When you use this FUNCTION to convert the time into the system time from within your xHarbour application, all files acquire this time with each write procedure.

Examples

      Set the system time in each case; but the hardware clock only
      on an AT:

      cNewTime := "10:20:00"
      IF ISAT()
         SetTime( cNewTime, .T. )
      ELSE
         SetTime( cNewTime )
      ENDIF

      Or, more compactly:

      SetTime( cNewTime, ISAT() )

Compliance

This function is CA-Cl*pper Tools compatible.

Platforms

Windows, Linux

Files

Source is dattime3.c, library is libct.

Seealso

SETDATE(), TIMEVALID()

Advertisements

Advertisements