time increase

how would i be able in c++ to increase the time() by a day or month?
This is for a different function - time(), not systemtime,localtime :)
The time() function returns the number of seconds since 00:00 hours, Jan 1, 1970 UTC. See the example here:
http://www.cplusplus.com/reference/clibrary/ctime/time/

To add 1 day, you have to add 86400 (24 hours * 60 minutes/hour * 60 seconds/minute).

To add 1 month, you have to figure out how many days there are in the current month and add that many days (times 86400).
Topic archived. No new replies allowed.