Skip to content

Commit

Permalink
Fixes #10827. When comparing dates for Yesterday/Today/Tomorrow outpu…
Browse files Browse the repository at this point in the history
…t, use local time.
  • Loading branch information
daniel-kristjansson committed Jun 12, 2012
1 parent 06153b2 commit c062750
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mythtv/libs/libmythbase/mythdate.cpp
Expand Up @@ -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");
Expand All @@ -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))
Expand Down

0 comments on commit c062750

Please sign in to comment.