struct tm current time_t timer int hours timer time NULL current local

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
struct tm *current;
time_t timer;
int hours;
timer = time(NULL);
current = localtime(&timer);
hours = current->tm_mon;
printf("hours : %d\n", &hours);
getch();
}