fixed: DbBase::ConvertTime(tm) should not have been used in this way as it was

(it uses a static buffer)
       now DbTextStream can get tm struct so you don't have to use ConvertTime 


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@662 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-10-09 20:27:45 +00:00
parent 69c634d53f
commit 07511a2eb0
7 changed files with 62 additions and 12 deletions

View File

@@ -245,8 +245,8 @@ Error Db::AddItemIntoItem(Item & item)
<< item.modification_user_id
<< item.group_id
<< item.privileges
<< ConvertTime(item.date_creation)
<< ConvertTime(item.date_modification)
<< item.date_creation
<< item.date_modification
<< static_cast<int>(item.type)
<< item.parent_id
<< item.content_id
@@ -356,8 +356,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
<< item.modification_user_id
<< item.group_id
<< item.privileges
<< ConvertTime(item.date_creation)
<< ConvertTime(item.date_modification)
<< item.date_creation
<< item.date_modification
<< static_cast<int>(item.type)
<< item.default_item
<< item.parent_id
@@ -1447,7 +1447,7 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread)
thread.closed = AssertValueLong(r, 0, cclosed) == 0 ? false : true;
thread.items = AssertValueLong(r, 0, citems);
thread.last_item.id = AssertValueLong(r, 0, clast_item);
thread.last_item.date_modification = ConvertTime( AssertValue(r, 0, cdate_modification) );
thread.last_item.date_modification = AssertValueTm(r, 0, cdate_modification);
thread.last_item.user_id = AssertValueLong(r, 0, cuser_id);
}
catch(const Error & e)
@@ -1500,7 +1500,7 @@ Error Db::GetThreads(long parent_id, std::vector<Thread> & thread_tab)
thread.closed = AssertValueLong(r, i, cclosed) == 0 ? false : true;
thread.items = AssertValueLong(r, i, citems);
thread.last_item.id = AssertValueLong(r, i, clast_item);
thread.last_item.date_modification = ConvertTime( AssertValue(r, i, cdate_modification) );
thread.last_item.date_modification = AssertValueTm(r, i, cdate_modification);
thread.last_item.user_id = AssertValueLong(r, i, cuser_id);
thread.last_item.guest_name = AssertValue(r, i, cguest_name);