Skip to content

Commit

Permalink
Create local_time.c
Browse files Browse the repository at this point in the history
  • Loading branch information
janbodnar committed Jan 31, 2016
1 parent 20dc63b commit e6b1ce6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions datetime/local_time.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit e6b1ce6

Please sign in to comment.