29 bool my_puttime(std::string &out,
const std::tm *tt,
const char *fmt)
37 if (
size_t sz = strftime(&out[0], 150, fmt, tt))
48 std::time_t tt = std::chrono::system_clock::to_time_t(tp);
50 bool ret =
my_puttime(out, std::localtime(&tt),
"%a, %d %b %Y %T %z");
51 ASSERT_LOG(ret,
"Failed to convert date to RFC2822");
This is the header file for a generated source file, GitSHA1.cpp.
std::string to_local_rfc2822(const std::chrono::system_clock::time_point &tp)
Convert a timepoint to an RFC2822 (SMTP) date.
bool my_puttime(std::string &out, const std::tm *tt, const char *fmt)
Exception class for LEOSAC Project related errors.
#define ASSERT_LOG(cond, msg)