Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Time
Time Reference
Time Functions
 GetLocalTime Function

  Switch on low bandwidth view
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

C++
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

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

GetSystemTime
Local Time
SetLocalTime
SYSTEMTIME
Time Functions

Send comments about this topic to Microsoft

Build date: 5/14/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker