trouble with coding time/ date

i am trying to write up the code for 31/01/2012 at 23:58 so that if you add 1 second it would change to 59 and if you add 2 seconds to it it would change to 1/02/2012 00:00. help would be much appreciated
Add the minutes. If you have more than 60 minutes, subtract 60 and add 1 hour. If you have more than 24 hours, subtract 24 and add 1 day.

etc, etc.
how would i be able to write this in code though?
I'm not going to do the work for you, but it should be very easy to translate what I just wrote in my above post to actual C++ code.
Topic archived. No new replies allowed.