From 03f6fd904f639fb7210d995759caadf6a83a3859 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 11 Oct 2009 17:03:00 +0200 Subject: new screen: mpd server info --- src/helpers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/helpers.cpp') diff --git a/src/helpers.cpp b/src/helpers.cpp index b0242085..c1479efc 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -244,6 +244,14 @@ bool CaseInsensitiveSorting::operator()(const Item &a, const Item &b) return a.type < b.type; } +std::string Timestamp(time_t t) +{ + char result[32]; + tm info; + result[strftime(result, 31, "%x %X", localtime_r(&t, &info))] = 0; + return result; +} + void UpdateSongList(Menu *menu) { bool bold = 0; -- cgit v1.2.3