The GetLocalTime function retrieves the current local date and time.
VOID GetLocalTime(
LPSYSTEMTIME lpSystemTime // address of system time structure
);
Parameters
lpSystemTime
Points to a SYSTEMTIME structure to receive the current local date and time.
Return Values
This function does not return a value.
The SYSTEMTIME structure represents a date and time using individual members for the month, day, year, weekday, hour, minute, second, and millisecond.
typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
Members
wYear
Specifies the current year.
wMonth
Specifies the current month; January = 1, February = 2, and so on.
wDayOfWeek
Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.