Export (0) Print
Expand All
12 out of 21 rated this helpful - Rate this topic

GetLocalTime function

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.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Examples

For an example, see SYSTEMTIME.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

GetSystemTime
Local Time
SetLocalTime
SYSTEMTIME
Time Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.