Green Fuze
April 8th, 2005, 08:57 PM
I have created a clock with:
CTime curTime = CTime::GetCurrentTime();
and
m_sTime = curTime.Format("%H:%M"); //m_sTime is a string of a static text
and it works great!!!
B-U-T
the thing is that I want it to add or subtract hours by the value of an integer
(or anything else that might do the job).
I thought maybe to add curTime.getHour() and the request integer (that should represent GMT) and than to convert the whole thing to a string,
but I'm having troubles in that to (the .ToString() doesn't really work...),
but I'd still have a problem that the hour of 23:13 in GMT+1 in GMT+3 will become 25:13, instead of 01:13.
is there any normal, not-so-complicated way to do that? and if not, can anyone help me with the int to string conversion.
THANKS ALOT!!
CTime curTime = CTime::GetCurrentTime();
and
m_sTime = curTime.Format("%H:%M"); //m_sTime is a string of a static text
and it works great!!!
B-U-T
the thing is that I want it to add or subtract hours by the value of an integer
(or anything else that might do the job).
I thought maybe to add curTime.getHour() and the request integer (that should represent GMT) and than to convert the whole thing to a string,
but I'm having troubles in that to (the .ToString() doesn't really work...),
but I'd still have a problem that the hour of 23:13 in GMT+1 in GMT+3 will become 25:13, instead of 01:13.
is there any normal, not-so-complicated way to do that? and if not, can anyone help me with the int to string conversion.
THANKS ALOT!!