fix operator< and operator== not working as expected

This commit is contained in:
Chris Danford
2004-07-20 07:11:26 +00:00
parent 0d4dde7dcd
commit 8d2d1ed3f7
2 changed files with 21 additions and 5 deletions
+11 -2
View File
@@ -16,9 +16,18 @@ void DateTime::Init()
DateTime DateTime::GetNowDateTime()
{
time_t now = time(NULL);
DateTime tNow;
tm tNow;
localtime_r( &now, &tNow );
return tNow;
DateTime dtNow;
#define COPY_M( v ) dtNow.v = tNow.v;
COPY_M( tm_year );
COPY_M( tm_mon );
COPY_M( tm_mday );
COPY_M( tm_hour );
COPY_M( tm_min );
COPY_M( tm_sec );
#undef COPY_M
return dtNow;
}
DateTime DateTime::GetNowDate()