GetTime Function

Action

Returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970 likewise as GMT or local time.

Include file

Kernel.bdh

Syntax

GetTime( in nFlags : number optional ): number;

Return value

The number of seconds elapsed since midnight, January 1, 1970.

Parameter Description
nFlags

This parameter can be one of the following flags (optional):

  • TIME_GMT: Returns GMT time (also known as UTC time; default).

  • TIME_LOCAL: Returns local time.

Example

transaction TTime
  var
    sTime : string;
    nTime : number;
  begin
    sTime := GetTimeStamp(TIMESTAMP_GMT | TIMESTAMP_IN_SEC);
    Print(sTime);
    nTime := GetTime(TIME_GMT);
    Print(string(nTime));
  end TTime;

Output

Number of seconds elapsed since January 1, 1970, GMT.