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



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

GetDateTime

Return system date and time

Declaration

Source position: oldlinux.pp line 1324

procedure GetDateTime(

  var Year: Word;

  var Month: Word;

  var Day: Word;

  var hour: Word;

  var minute: Word;

  var second: Word

);

Description

Returns the current date and time. The time is corrected for the local time zone. This procedure is equivalent to the GetDate and GetTime calls.

Errors

None

See also

GetEpochTime

  

Return the current unix time

GetTime

  

Return current system time

EpochToLocal

  

Convert epoch time to local time

GetDate

  

Return the system date

Example

Program Example6;

{ Program to demonstrate the GetDateTime function. }

Uses oldlinux;

Var Year, Month, Day, Hour, min, sec : Word;

begin
 GetDateTime (Year, Month, Day, Hour, min, sec);
 Writeln ('Date : ',Day:2,'/',Month:2,'/',Year:4);
 Writeln ('Time : ',Hour:2,':',Min:2,':',Sec:2);
end.

Notes

 No notes exist for this page yet. 





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