fixed time_now_string() to not include a line feed at the end

This commit is contained in:
Arvid Norberg 2007-04-14 20:12:15 +00:00
parent 44603cf049
commit ecb20f97fd
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,10 @@ namespace libtorrent
inline char const* time_now_string()
{
time_t t = std::time(0);
return std::ctime(&t);
tm* timeinfo = std::localtime(&t);
static char str[200];
std::strftime(str, 200, "%b %d %X", timeinfo);
return str;
}
}