「ctime」を使用すると、curTime と pastTime の実際の値が 600 秒異なっていても、curTime と pastTime で同じ文字列結果が得られます。
ctime を使用している場合、両方で同じ文字列時間を取得するにはどうすればよいですか?
どうも
struct _timeb timebuffer;
_ftime(&timebuffer);
const time_t curTime = (const time_t)timebuffer.time;
const time_t pastTime = curTime - (const time_t)600;
s.Format("%d %s\n%d %s", curTime, ctime(&curTime), pastTime, ctime(&pastTime) );
MessageBox(s);