GetSystemTime function (sysinfoapi.h)
Retrieves the current system date and time in Coordinated Universal Time (UTC) format.
To retrieve the current system date and time in local time, use the GetLocalTime function.
Syntax
void GetSystemTime(
LPSYSTEMTIME lpSystemTime
);
Parameters
lpSystemTime
A pointer to a SYSTEMTIME structure to receive the current system date and time. The lpSystemTime parameter must not be NULL. Using NULL will result in an access violation.
Return value
None
Remarks
To set the current system date and time, use the SetSystemTime function.
Examples
For an example, see SYSTEMTIME.
Requirements
| Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
| Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
| Target Platform | Windows |
| Header | sysinfoapi.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |