help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'oldlinux' (#rtl)

EpochToLocal

Convert epoch time to local time

Declaration

Source position: oldlinux.pp line 1318

procedure EpochToLocal(

  epoch: LongInt;

  var year: Word;

  var month: Word;

  var day: Word;

  var hour: Word;

  var minute: Word;

  var 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.

This function takes into account the timzeone settings of your system.

Errors

None

See also

GetEpochTime

  

Return the current unix time

LocalToEpoch

  

Convert local time to epoch (unix) time

GetTime

  

Return current system time

GetDate

  

Return the system date

Example

Program Example3;

{ Program to demonstrate the EpochToLocal function. }

Uses oldlinux;

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505