db/PlaylistInfo: use std::chrono::system_clock::time_point

This commit is contained in:
Max Kellermann
2017-02-11 23:09:33 +01:00
parent 9d0a71f245
commit 6f37f5752b
8 changed files with 32 additions and 17 deletions

View File

@@ -35,6 +35,7 @@
#include "decoder/DecoderPrint.hxx"
#include "ls.hxx"
#include "mixer/Volume.hxx"
#include "util/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/StringAPI.hxx"
#include "fs/AllocatedPath.hxx"
@@ -63,7 +64,7 @@ print_spl_list(Response &r, const PlaylistVector &list)
for (const auto &i : list) {
r.Format("playlist: %s\n", i.name.c_str());
if (i.mtime > 0)
if (!IsNegative(i.mtime))
time_print(r, "Last-Modified", i.mtime);
}
}

View File

@@ -37,6 +37,7 @@
#include "fs/AllocatedPath.hxx"
#include "util/UriUtil.hxx"
#include "util/ConstBuffer.hxx"
#include "util/ChronoUtil.hxx"
bool
playlist_commands_available() noexcept
@@ -50,7 +51,7 @@ print_spl_list(Response &r, const PlaylistVector &list)
for (const auto &i : list) {
r.Format("playlist: %s\n", i.name.c_str());
if (i.mtime > 0)
if (!IsNegative(i.mtime))
time_print(r, "Last-Modified", i.mtime);
}
}