Create local_time.c

This commit is contained in:
janbodnar 2016-01-31 14:00:26 +01:00
parent 20dc63bb54
commit e6b1ce6958

14
datetime/local_time.c Normal file
View File

@ -0,0 +1,14 @@
#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;
}