Retrieves the current local date and time.
To retrieve the current date and time in Coordinated Universal Time (UTC) format, use the GetSystemTime function.
Syntax
|
void WINAPI GetLocalTime(
__out LPSYSTEMTIME lpSystemTime
);
|
Parameters
- lpSystemTime [out]
-
A pointer to a
SYSTEMTIME structure to receive the current local date and time.
Return Value
This function does not return a value.
Remarks
To set the current local date and time, use the SetLocalTime function.
Examples
For an example, see
SYSTEMTIME.
Requirements
| Client | Requires Windows Vista, Windows XP, or Windows 2000 Professional. |
| Server | Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server. |
| Header | Declared in Winbase.h; include Windows.h. |
| Library | Use Kernel32.lib. |
| DLL | Requires Kernel32.dll. |
See Also
GetSystemTime
Local Time
SetLocalTime
SYSTEMTIME
Time Functions
Send comments about this topic to Microsoft
Build date: 8/14/2008