Skip to content
Browse files

Fixes #10827. When comparing dates for Yesterday/Today/Tomorrow outpu…

…t, use local time.
  • Loading branch information...
1 parent 06153b2 commit c0627502ebc6c9f993d3b18457ccc4090449301a @daniel-kristjansson daniel-kristjansson committed Jun 11, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 mythtv/libs/libmythbase/mythdate.cpp
View
3 mythtv/libs/libmythbase/mythdate.cpp
@@ -114,8 +114,6 @@ QString toString(const QDate &date, uint format)
if (format & (kDateFull | kDateShort))
{
- QDate now = current().date();
-
QString stringformat;
if (format & kDateShort)
stringformat = gCoreContext->GetSetting("ShortDateFormat", "ddd d");
@@ -130,6 +128,7 @@ QString toString(const QDate &date, uint format)
if (format & ~kDateShort)
{
+ QDate now = current().toLocalTime().date();
if ((format & kSimplify) && (now == date))
result = QObject::tr("Today");
else if ((format & kSimplify) && (now.addDays(-1) == date))

0 comments on commit c062750

Please sign in to comment.
Something went wrong with that request. Please try again.