summaryrefslogtreecommitdiff
path: root/src/TimePrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-25 08:33:59 +0200
committerMax Kellermann <max@musicpd.org>2018-07-25 08:33:59 +0200
commita8ac8b25638b0dae65b8770de2725828e7372427 (patch)
tree7823869dcb938defcd5172f8acc6a3275648ebdb /src/TimePrint.cxx
parent78a65cf2817c6584a35789d46c45872c2557924e (diff)
TimePrint: remove unused time_t overload
Diffstat (limited to 'src/TimePrint.cxx')
-rw-r--r--src/TimePrint.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx
index a9e932a43..19115a6c6 100644
--- a/src/TimePrint.cxx
+++ b/src/TimePrint.cxx
@@ -22,13 +22,15 @@
#include "client/Response.hxx"
void
-time_print(Response &r, const char *name, time_t t)
+time_print(Response &r, const char *name,
+ std::chrono::system_clock::time_point t)
{
+ time_t t2 = std::chrono::system_clock::to_time_t(t);
#ifdef _WIN32
- const struct tm *tm2 = gmtime(&t);
+ const struct tm *tm2 = gmtime(&t2);
#else
struct tm tm;
- const struct tm *tm2 = gmtime_r(&t, &tm);
+ const struct tm *tm2 = gmtime_r(&t2, &tm);
#endif
if (tm2 == nullptr)
return;