mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 15:12:30 +00:00
Adding tracker group cycle.
Adding creation date display. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@468 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+17
-1
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -68,4 +67,21 @@ print_hhmmss(utils::Timer t) {
|
||||
return str.str();
|
||||
}
|
||||
|
||||
std::string
|
||||
print_ddmmyyyy(time_t t) {
|
||||
std::tm *u = std::gmtime(&t);
|
||||
|
||||
if (u == NULL)
|
||||
return "inv_time";
|
||||
|
||||
std::stringstream str;
|
||||
str.fill('0');
|
||||
|
||||
str << std::setw(2) << u->tm_mday << '/'
|
||||
<< std::setw(2) << u->tm_mon << '/'
|
||||
<< std::setw(4) << (1900 + u->tm_year);
|
||||
|
||||
return str.str();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user