- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 获取系统日期时间
function NowGMT: TDateTime;
var
ST: TSystemTime;
begin
// This Windows API function gets system time in UTC/GMT
// see http://msdn.microsoft.com/en-us/library/ms724390
GetSystemTime(ST);
Result := SystemTimeToDateTime(ST);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.text:=DateTimetostr(NowGMT);
end;