fix(history): format local time string correctly in JSON output

This commit is contained in:
Marcus Holland-Moritz 2025-08-27 22:18:21 +02:00
parent 3642ecab61
commit 02782ce69e

View File

@ -180,7 +180,7 @@ nlohmann::json history::as_json() const {
if (auto ts = histent.timestamp(); ts.has_value()) {
entry["timestamp"] = {
{"epoch", ts.value()},
{"local", fmt::format("%FT%T", safe_localtime(ts.value()))},
{"local", fmt::format("{:%FT%T}", safe_localtime(ts.value()))},
};
}