Ticket #6679: mythtv-6679-always_show_year_for_schedules_direct_expiration.patch
File mythtv-6679-always_show_year_for_schedules_direct_expiration.patch, 1.2 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/datadirect.cpp
436 436 QString ExtractDateFromMessage = pchars.right(20); 437 437 QDateTime EDFM = QDateTime::fromString(ExtractDateFromMessage, 438 438 Qt::ISODate); 439 QString SDDateFormat = GetMythDB()->GetSetting("DateFormat", 440 "ddd d MMMM"); 441 // Ensure we show the year when it's important, regardless of 442 // specified DateFormat 443 if ((!SDDateFormat.contains('y')) && 444 (EDFM.date().year() != QDate::currentDate().year())) 445 { 446 SDDateFormat.append(" (yyyy)"); 447 } 439 448 QString dateFormat = QString("%1 %2") 440 .arg( GetMythDB()->GetSetting("DateFormat", "ddd d MMMM"))449 .arg(SDDateFormat) 441 450 .arg(GetMythDB()->GetSetting("TimeFormat", "hh:mm")); 442 451 QString ExpirationDate = EDFM.toString(dateFormat); 443 452