At the moment, result-set-management is not implemented, the whole history (well, at most 1024 messages) is returned.
12 lines
307 B
C++
12 lines
307 B
C++
#include <utils/time.hpp>
|
|
|
|
namespace utils
|
|
{
|
|
std::string to_string(const std::time_t& timestamp)
|
|
{
|
|
constexpr std::size_t stamp_size = 20;
|
|
char date_buf[stamp_size];
|
|
std::strftime(date_buf, stamp_size, "%FT%TZ", std::gmtime(×tamp));
|
|
return {std::begin(date_buf), std::end(date_buf)};
|
|
}
|
|
} |