Don't use put_time() because it’s not in gcc 4.9, in shitty-debian “stable”
Use strftime instead
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#include <louloulibs.h>
|
#include <louloulibs.h>
|
||||||
#ifdef SYSTEMD_FOUND
|
#ifdef SYSTEMD_FOUND
|
||||||
@@ -446,9 +445,10 @@ void XmppComponent::send_history_message(const std::string& muc_name, const std:
|
|||||||
XmlNode delay("delay");
|
XmlNode delay("delay");
|
||||||
delay["xmlns"] = "urn:xmpp:delay";
|
delay["xmlns"] = "urn:xmpp:delay";
|
||||||
delay["from"] = muc_name + "@" + this->served_hostname;
|
delay["from"] = muc_name + "@" + this->served_hostname;
|
||||||
std::stringstream date_ss;
|
constexpr std::size_t stamp_size = 20;
|
||||||
date_ss << std::put_time(std::gmtime(×tamp), "%FT%Tz") << std::endl;
|
char date_buf[stamp_size];
|
||||||
delay["stamp"] = date_ss.str();
|
std::strftime(date_buf, stamp_size, "%FT%Tz", std::gmtime(×tamp));
|
||||||
|
delay["stamp"] = date_buf;
|
||||||
|
|
||||||
message.add_child(std::move(delay));
|
message.add_child(std::move(delay));
|
||||||
this->send_stanza(message);
|
this->send_stanza(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user