原文链接 -> 传送门
函数功能:
GetSystemTime 函数获取当前系统日期与时间。系统时间是以世界标准时间(UTC)表示的。
如果需要获取当前系统日期与时间的本地表示,使用 GetLocalTime 函数。
API 函数原型:
注释:_Out_ 说明该参数是输出的。
void WINAPI GetSystemTime( _Out_ LPSYSTEMTIME lpSystemTime );
参数解析:
|
参数 |
含义 |
|
lpSystemTime |
1. 指向将获取当前系统日期和时间的 SYSTEMTIME 结构的指针 |
返回值:
该函数不返回值或提供扩展错误信息。
备注:
设置当前系统日期与时间,使用 SetSystemTime 函数。
需求:
|
Minimum supported client |
Windows 2000 专业版 [桌面应用程序 | Windows 商店应用程序] |
|
Minimum supported server |
Windows 2000 服务器版 [桌面应用程序 | Windows 商店应用程序] |
|
Minimum supported phone |
Windows Phone 8 |
|
Header |
Winbase.h (包含于 Windows.h) |
|
Library |
Kernel32.lib |
|
DLL |
Kernel32.dll |




