next up previous contents index
Next: Execl Up: Functions and procedures Previous: Dup2

EpochToLocal

   

Declaration:

Procedure EpochToLocal (Epoch : Longint; var Year,Month,Day,Hour,Minute,Second : Word) ;

Description:

Converts the epoch time (=Number of seconds since 00:00:00 , January 1, 1970, corrected for your time zone ) to local date and time.

Errors:

None

See also:

GetEpochTime, LocalToEpoch, GetTime,GetDate

Example
Program Example3;

{ Program to demonstrate the EpochToLocal function. }

Uses linux;

Var Year,month,day,hour,minute,seconds : Word;

begin
  EpochToLocal (GetEpochTime,Year,month,day,hour,minute,seconds);
  Writeln ('Current date : ',Day:2,'/',Month:2,'/',Year:4);
  Writeln ('Current time : ',Hour:2,':',minute:2,':',seconds:2);
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998