You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
451 B
C++

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#include "TimePrint.hxx"
#include "client/Response.hxx"
#include "time/ISO8601.hxx"
#include "util/StringBuffer.hxx"
#include <fmt/format.h>
void
time_print(Response &r, const char *name,
std::chrono::system_clock::time_point t)
{
StringBuffer<64> s;
try {
s = FormatISO8601(t);
} catch (...) {
return;
}
r.Fmt("{}: {}\n", name, s.c_str());
}