maybe i wasn't clear... I want to set the time and date as integers. As in seconds would be an int, minutes would be an int, and hours would be an int.
Same thing with date, the day, year, and month would be different ints.
I am guessing using struct tm and/or local time.
1 2 3 4 5 6 7 8 9
|
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
| |
1 2 3 4 5 6 7 8 9 10 11
|
int main ()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
return 0;
}
| |
I don't know how to implement the two together
now all you need is to access waht u wanted from the tm via e.g. timeinfo->tm_hour ,tm_sec or tm_minute <- all cute ints <3 |
does that mean I put the tms after time info after localtime and in the parentheses i put my tms???
all i see is the tm ints and I don't know what to do with them....
incubbus: i know, Struc tm, but i dont know what function to use much less how to use it