Windows-API-examples/datetime/local_time.c
2016-01-31 14:00:26 +01:00

15 lines
227 B
C

#include <windows.h>
#include <wchar.h>
int wmain(void) {
SYSTEMTIME lt = {0};
GetLocalTime(&lt);
wprintf(L"The local time is: %02d:%02d:%02d\n",
lt.wHour, lt.wMinute, lt.wSecond);
return 0;
}