Unit 'BaseUnix' Package
[Overview][Constants][Types][Procedures and functions][Index] [#rtl]

fptime

Return the current Unix time.

Declaration

Source position: bunxh.inc line 98

function FpTime(

  var tloc: TTime

):TTime;

function fptime: time_t;

Description

FpTime returns the number of seconds since 1970-01-01T00:00Z ignoring leap seconds. It is adjusted to the local time zone, but not to DST (daylight savings time). The result is also stored in tloc if it is specified.

Errors

On error, -1 is returned. Extended error information can be retrieved using fpGetErrno.

See also

#rtl.dateutils.unixtodatetime

  

Convert Unix epoch time to a TDateTime value.

#rtl.dateutils.unixtimestamptomac

  

Convert Unix Timestamp to a Mac Timestamp.

Example

Program Example1;

{ Program to demonstrate the fptime function. }

Uses baseunix;

begin
  Write ('Second past the start of the Epoch (1970-01-01T00:00): ');
  Writeln (fptime);
end.

Documentation generated on: Nov 23 2024