Applies to: desktop apps | Metro style apps
Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).
To retrieve the current system date and time in local time, use the GetLocalTime function.
void WINAPI GetSystemTime( __out LPSYSTEMTIME 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.
This function does not return a value or provide extended error information.
To set the current system date and time, use the SetSystemTime function.
For an example, see SYSTEMTIME.
Minimum supported client
Minimum supported server
Header
Library
DLL
Send comments about this topic to Microsoft
Build date: 3/6/2012