Edit the values? Do you mean change the time, or simply change variables set from the time?
<ctime> defines
Code:
struct tm {
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;
};
The function
Code:
struct tm *localtime(const time_t *time)
returns a pointer to this type of structure, based on the value of *time. If you want the time data:
Code:
struct tm tizzle;
struct tm *t_ptr;
t_ptr = localtime(time(NULL));
tizzle.some_member = t_ptr->some_member; //copy the data
//........etc...........
I don't know about the data that localtime points to, so I'd make sure to copy its data into another struct before being called again or something. I might be wrong, but my book doesn't say how to use the function correctly. Anyway, I hope this gives you a good idea.