Permalink
Browse files

Show mythfilldatabase start/end in local time on the backend status p…

…age.
  • Loading branch information...
stichnot committed Jun 29, 2012
1 parent 6f4f87b commit 86eee5ef0ae45b0eb7f4b35db90de705bd5374ad
Showing with 9 additions and 2 deletions.
  1. +9 −2 mythtv/programs/mythbackend/httpstatus.cpp
@@ -171,6 +171,13 @@ void HttpStatus::GetStatusHTML( HTTPRequest *pRequest )
PrintStatus( stream, &doc );
}
+static QString setting_to_localtime(const char *setting)
+{
+ QString origDateString = gCoreContext->GetSetting(setting);
+ QDateTime origDate = MythDate::fromString(origDateString);
+ return MythDate::toString(origDate, MythDate::kDateTimeFull);
+}
+
void HttpStatus::FillStatusXML( QDomDocument *pDoc )
{
QDateTime qdtNow = MythDate::current();
@@ -535,9 +542,9 @@ void HttpStatus::FillStatusXML( QDomDocument *pDoc )
}
guide.setAttribute("start",
- gCoreContext->GetSetting("mythfilldatabaseLastRunStart"));
+ setting_to_localtime("mythfilldatabaseLastRunStart"));
guide.setAttribute("end",
- gCoreContext->GetSetting("mythfilldatabaseLastRunEnd"));
+ setting_to_localtime("mythfilldatabaseLastRunEnd"));
guide.setAttribute("status",
gCoreContext->GetSetting("mythfilldatabaseLastRunStatus"));
if (gCoreContext->GetNumSetting("MythFillGrabberSuggestsTime", 0))

0 comments on commit 86eee5e

Please sign in to comment.