summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 0f3ab0a9..bc01a5f0 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.23 2012/05/08 11:13:13 kls Exp $
+ * $Id: tools.c 2.24 2012/05/12 13:29:20 kls Exp $
*/
#include "tools.h"
@@ -1042,6 +1042,15 @@ cString DateString(time_t t)
return buf;
}
+cString ShortDateString(time_t t)
+{
+ char buf[32];
+ struct tm tm_r;
+ tm *tm = localtime_r(&t, &tm_r);
+ strftime(buf, sizeof(buf), "%d.%m.%y", tm);
+ return buf;
+}
+
cString TimeString(time_t t)
{
char buf[25];