[Lazarus] Now function - returning UTC?

David Taylor david-taylor at blueyonder.co.uk
Sat Apr 19 17:37:25 CEST 2014


I have a version of the Now function which works in Windows and returns UTC.

function NowUTC: TDateTime;
var
   system_datetime: TSystemTime;
begin
   GetSystemTime (system_datetime);
   Result := SystemTimeToDateTime (system_datetime);
end;

I've had an enquiry for a version of this for Lazarus, to run on the 
Raspberry Pi (Debian) but my Linux knowledge isn't up to writing an 
equivalent.  I've searched and don't see GetSystemTime in FreePascal.

Can anyone help with this apparently simple problem?

Thanks,
David
-- 
Web: http://www.satsignal.eu





More information about the Lazarus mailing list