From 0676448937e9f851d34380904a249b15bf97e14c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 15 Jan 2006 14:35:14 +0100 Subject: [PATCH] Added a leading '0' to the day in the DayDateTime() function --- CONTRIBUTORS | 1 + HISTORY | 2 ++ tools.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 17ff07ae..7de9d3f3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -935,6 +935,7 @@ Rolf Ahrenberg for changing the title of the recording info menu for reporting a bug in handling key macros with keys after @plugin for adding compiler options "-fPIC -g" to all plugins + for adding a leading '0' to the day in the DayDateTime() function Ralf Klueber for reporting a bug in cutting a recording if there is only a single editing mark diff --git a/HISTORY b/HISTORY index d4caac99..85fd2413 100644 --- a/HISTORY +++ b/HISTORY @@ -4185,3 +4185,5 @@ Video Disk Recorder Revision History closed in which a timer has been modified, which speeds up closing submenus. - Now only writing Dolby Digital tracks into the 'info.vdr' file of a recording if Setup.UseDolbyDigital is true (suggested by André Weidemann). +- Added a leading '0' to the day in the DayDateTime() function (thanks to Rolf + Ahrenberg). diff --git a/tools.c b/tools.c index 68a706b2..33b2ec62 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 1.109 2006/01/08 11:40:35 kls Exp $ + * $Id: tools.c 1.110 2006/01/15 14:31:45 kls Exp $ */ #include "tools.h" @@ -625,7 +625,7 @@ cString DayDateTime(time_t t) time(&t); struct tm tm_r; tm *tm = localtime_r(&t, &tm_r); - snprintf(buffer, sizeof(buffer), "%s %2d.%02d %02d:%02d", *WeekDayName(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); + snprintf(buffer, sizeof(buffer), "%s %02d.%02d %02d:%02d", *WeekDayName(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); return buffer; }