removed: in some places a dependencies to tm struct has left

removed: operator<<(tm&) from streams: textstream, log, dbtextstream, htmltextstream



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@840 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-05-27 18:11:34 +00:00
parent 1b858f5782
commit 9d5d088b4a
14 changed files with 24 additions and 159 deletions

View File

@@ -194,18 +194,15 @@ return *this;
}
DbTextStream & DbTextStream::operator<<(RawText<tm> t)
{
buffer += ConvertTime(t.par);
was_param = false;
return *this;
}
DbTextStream & DbTextStream::operator<<(RawText<PT::Date> date)
{
date.par.Serialize(*this);
tmp_stream.Clear();
date.par.Serialize(tmp_stream);
AssignString(tmp_stream.CStr(), buffer, false);
tmp_stream.Clear();
was_param = false;
return *this;
@@ -529,18 +526,6 @@ return *this;
DbTextStream & DbTextStream::operator<<(const tm & t)
{
if( was_param )
buffer += ", ";
buffer += '\'';
buffer += ConvertTime(t);
buffer += '\'';
was_param = true;
return *this;
}
DbTextStream & DbTextStream::operator<<(const std::vector<long> & tabid)
@@ -566,22 +551,6 @@ return *this;
}
const char * DbTextStream::ConvertTime(const tm & t)
{
// not thread safe
static char buffer[100];
sprintf(buffer, "%04d-%02d-%02d %02d:%02d:%02d",
t.tm_year + 1900,
t.tm_mon + 1,
t.tm_mday,
t.tm_hour,
t.tm_min,
t.tm_sec);
return buffer;
}