summaryrefslogtreecommitdiff
path: root/views/displaymenuitemcurrentview.c
diff options
context:
space:
mode:
Diffstat (limited to 'views/displaymenuitemcurrentview.c')
-rw-r--r--views/displaymenuitemcurrentview.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/views/displaymenuitemcurrentview.c b/views/displaymenuitemcurrentview.c
index 13f27c7..7ef9cc0 100644
--- a/views/displaymenuitemcurrentview.c
+++ b/views/displaymenuitemcurrentview.c
@@ -138,8 +138,15 @@ void cDisplayMenuItemCurrentSchedulesView::Render(void) {
stringTokens.insert(pair<string,string>("description", event->Description() ? event->Description() : ""));
stringTokens.insert(pair<string,string>("start", *(event->GetTimeString())));
stringTokens.insert(pair<string,string>("stop", *(event->GetEndTimeString())));
- stringTokens.insert(pair<string,string>("day", *WeekDayName(event->StartTime())));
- stringTokens.insert(pair<string,string>("date", *ShortDateString(event->StartTime())));
+
+ time_t startTime = event->StartTime();
+ stringTokens.insert(pair<string,string>("day", *WeekDayName(startTime)));
+ stringTokens.insert(pair<string,string>("date", *ShortDateString(startTime)));
+ struct tm * sStartTime = localtime(&startTime);
+ intTokens.insert(pair<string, int>("year", sStartTime->tm_year + 1900));
+ intTokens.insert(pair<string, int>("daynumeric", sStartTime->tm_mday));
+ intTokens.insert(pair<string, int>("month", sStartTime->tm_mon+1));
+
bool isRunning = false;
time_t now = time(NULL);
if ((now >= event->StartTime()) && (now <= event->EndTime()))
@@ -539,6 +546,13 @@ void cDisplayMenuItemCurrentRecordingView::Render(void) {
recDate = *DateString(start);
recTime = *TimeString(start);
}
+
+ time_t startTime = event->StartTime();
+ struct tm * sStartTime = localtime(&startTime);
+ intTokens.insert(pair<string, int>("year", sStartTime->tm_year + 1900));
+ intTokens.insert(pair<string, int>("daynumeric", sStartTime->tm_mday));
+ intTokens.insert(pair<string, int>("month", sStartTime->tm_mon+1));
+
int duration = event->Duration() / 60;
int recDuration = recording->LengthInSeconds();
recDuration = (recDuration>0)?(recDuration / 60):0;