2014-04-19 12:37 GMT-03:00 David Taylor <david-tay...@blueyonder.co.uk>:

> 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'm used this:

class function TDropboxOAuthUtil.GenerateTimeStamp: string;
{$IFNDEF FPC}
var
  VCurTime: TSystemTime;
{$ENDIF}
begin
{$IFNDEF FPC}
  GetSystemTime(VCurTime);
{$ENDIF}
  Result := IntToStr(DateTimeToUnix({$IFDEF
FPC}LocalTimeToUniversal(Now){$ELSE}
    SystemTimeToDateTime(VCurTime){$ENDIF}));
end;

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to