diff --git a/mythtv/libs/libmythbase/mthread.cpp b/mythtv/libs/libmythbase/mthread.cpp
index 8764d1e..609d22a 100644
|
a
|
b
|
using namespace std;
|
| 32 | 32 | // MythTV headers |
| 33 | 33 | #include "mythlogging.h" |
| 34 | 34 | #include "mythdbcon.h" |
| 35 | | #include "mthread.h" |
| 36 | 35 | #include "mythtimer.h" |
| | 36 | #include "mythdate.h" |
| 37 | 37 | #include "logging.h" |
| | 38 | #include "mthread.h" |
| 38 | 39 | #include "mythdb.h" |
| 39 | 40 | |
| 40 | 41 | bool is_current_thread(MThread *thread) |
| … |
… |
void MThread::RunEpilog(void)
|
| 227 | 228 | void MThread::ThreadSetup(const QString &name) |
| 228 | 229 | { |
| 229 | 230 | loggingRegisterThread(name); |
| 230 | | qsrand(QDateTime::currentDateTime().toTime_t() ^ |
| 231 | | QTime::currentTime().msec()); |
| | 231 | qsrand(MythDate::current().toTime_t() ^ QTime::currentTime().msec()); |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | void MThread::ThreadCleanup(void) |
diff --git a/mythtv/libs/libmythbase/mythcommandlineparser.cpp b/mythtv/libs/libmythbase/mythcommandlineparser.cpp
index c269a83..3bbac88 100644
|
a
|
b
|
QString MythCommandLineParser::GetLogFilePath(void)
|
| 2443 | 2443 | |
| 2444 | 2444 | logdir = finfo.filePath(); |
| 2445 | 2445 | logfile = QCoreApplication::applicationName() + "." + |
| 2446 | | QDateTime::currentDateTime().toString("yyyyMMddhhmmss") + |
| 2447 | | QString(".%1").arg(pid) + ".log"; |
| | 2446 | MythDate::toString(MythDate::current(), MythDate::kFilename) + |
| | 2447 | QString(".%1").arg(pid) + ".log"; |
| 2448 | 2448 | |
| 2449 | 2449 | SetValue("logdir", logdir); |
| 2450 | 2450 | SetValue("logfile", logfile); |
diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index f7896b6..61b86b7 100644
|
a
|
b
|
using namespace std;
|
| 39 | 39 | #include "logging.h" |
| 40 | 40 | #include "mthread.h" |
| 41 | 41 | #include "serverpool.h" |
| | 42 | #include "mythdate.h" |
| 42 | 43 | |
| 43 | 44 | #define LOC QString("MythCoreContext: ") |
| 44 | 45 | |
| … |
… |
MythCoreContextPrivate::MythCoreContextPrivate(MythCoreContext *lparent,
|
| 106 | 107 | m_blockingClient(false) |
| 107 | 108 | { |
| 108 | 109 | MThread::ThreadSetup("CoreContext"); |
| 109 | | srandom(QDateTime::currentDateTime().toTime_t() ^ |
| 110 | | QTime::currentTime().msec()); |
| | 110 | srandom(MythDate::current().toTime_t() ^ QTime::currentTime().msec()); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | MythCoreContextPrivate::~MythCoreContextPrivate() |
diff --git a/mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp b/mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
index d837067..9493288 100644
|
a
|
b
|
|
| 9 | 9 | #include <QKeyEvent> |
| 10 | 10 | |
| 11 | 11 | #include "mthread.h" |
| | 12 | #include "mythdate.h" |
| 12 | 13 | #include "mythlogging.h" |
| 13 | 14 | #include "mythcorecontext.h" |
| 14 | 15 | #include "mythuiactions.h" |
| … |
… |
void MythAirplayServer::SendResponse(QTcpSocket *socket,
|
| 742 | 743 | reply.append(StatusToString(status)); |
| 743 | 744 | reply.append("\r\n"); |
| 744 | 745 | reply.append("DATE: "); |
| 745 | | reply.append(QDateTime::currentDateTime().toString("ddd, d MMM yyyy hh:mm:ss")); |
| | 746 | reply.append(MythDate::current().toString("ddd, d MMM yyyy hh:mm:ss")); |
| 746 | 747 | reply.append(" GMT\r\n"); |
| 747 | 748 | if (header.size()) |
| 748 | 749 | reply.append(header); |
diff --git a/mythtv/libs/libmythtv/HLS/httplivestream.cpp b/mythtv/libs/libmythtv/HLS/httplivestream.cpp
index f297e7a..0978d40 100644
|
a
|
b
|
|
| 29 | 29 | #include <QUrl> |
| 30 | 30 | |
| 31 | 31 | #include "mythcorecontext.h" |
| | 32 | #include "mythdate.h" |
| 32 | 33 | #include "mythdirs.h" |
| 33 | 34 | #include "mythtimer.h" |
| 34 | 35 | #include "mthreadpool.h" |
| … |
… |
HTTPLiveStream::HTTPLiveStream(QString srcFile, uint16_t width, uint16_t height,
|
| 101 | 102 | m_bitrate(bitrate), |
| 102 | 103 | m_audioBitrate(abitrate), m_audioOnlyBitrate(aobitrate), |
| 103 | 104 | m_sampleRate(srate), |
| 104 | | m_created(QDateTime::currentDateTime()), |
| 105 | | m_lastModified(QDateTime::currentDateTime()), |
| | 105 | m_created(MythDate::current()), |
| | 106 | m_lastModified(MythDate::current()), |
| 106 | 107 | m_percentComplete(0), |
| 107 | 108 | m_status(kHLSStatusUndefined) |
| 108 | 109 | { |
| … |
… |
bool HTTPLiveStream::LoadFromDB(void)
|
| 671 | 672 | m_curSegment = query.value(7).toUInt(); |
| 672 | 673 | m_segmentCount = query.value(8).toUInt(); |
| 673 | 674 | m_percentComplete = query.value(9).toUInt(); |
| 674 | | m_created = query.value(10).toDateTime(); |
| 675 | | m_lastModified = query.value(11).toDateTime(); |
| | 675 | m_created = MythDate::as_utc(query.value(10).toDateTime()); |
| | 676 | m_lastModified = MythDate::as_utc(query.value(11).toDateTime()); |
| 676 | 677 | m_relativeURL = query.value(12).toString(); |
| 677 | 678 | m_fullURL = query.value(13).toString(); |
| 678 | 679 | m_status = (HTTPLiveStreamStatus)(query.value(14).toInt()); |
diff --git a/mythtv/libs/libmythtv/osd.cpp b/mythtv/libs/libmythtv/osd.cpp
index 6b2f09f..d75e231 100644
|
a
|
b
|
void OSD::SetText(const QString &window, QHash<QString,QString> &map,
|
| 498 | 498 | { |
| 499 | 499 | int startts = map["startts"].toInt(); |
| 500 | 500 | int endts = map["endts"].toInt(); |
| 501 | | int nowts = QDateTime::currentDateTime().toTime_t(); |
| | 501 | int nowts = MythDate::current().toTime_t(); |
| 502 | 502 | if (startts > nowts) |
| 503 | 503 | { |
| 504 | 504 | bar->SetUsed(0); |
diff --git a/mythtv/libs/libmythtv/recordingrule.cpp b/mythtv/libs/libmythtv/recordingrule.cpp
index e0a0872..434ebba 100644
|
a
|
b
|
bool RecordingRule::Load(bool asTemplate)
|
| 180 | 180 | // and influence watch list weighting |
| 181 | 181 | if (!asTemplate) |
| 182 | 182 | { |
| 183 | | m_nextRecording = query.value(43).toDateTime(); |
| 184 | | m_lastRecorded = query.value(44).toDateTime(); |
| 185 | | m_lastDeleted = query.value(45).toDateTime(); |
| | 183 | m_nextRecording = MythDate::as_utc(query.value(43).toDateTime()); |
| | 184 | m_lastRecorded = MythDate::as_utc(query.value(44).toDateTime()); |
| | 185 | m_lastDeleted = MythDate::as_utc(query.value(45).toDateTime()); |
| 186 | 186 | m_averageDelay = query.value(46).toInt(); |
| 187 | 187 | } |
| 188 | 188 | |
diff --git a/mythtv/libs/libmythui/mythuiclock.cpp b/mythtv/libs/libmythui/mythuiclock.cpp
index 422d143..7892174 100644
|
a
|
b
|
void MythUIClock::SetText(const QString &text)
|
| 73 | 73 | |
| 74 | 74 | if (txt.isEmpty()) |
| 75 | 75 | { |
| 76 | | m_Time = QDateTime::currentDateTime(); |
| | 76 | m_Time = MythDate::current(); |
| 77 | 77 | txt = GetTimeText(); |
| 78 | 78 | } |
| 79 | 79 | |
diff --git a/mythtv/programs/mythbackend/services/channel.cpp b/mythtv/programs/mythbackend/services/channel.cpp
index 555d670..386a18d 100644
|
a
|
b
|
|
| 38 | 38 | #include "sourceutil.h" |
| 39 | 39 | #include "cardutil.h" |
| 40 | 40 | #include "datadirect.h" |
| | 41 | #include "mythdate.h" |
| 41 | 42 | |
| 42 | 43 | #include "serviceUtil.h" |
| 43 | 44 | |
| … |
… |
DTC::VideoMultiplexList* Channel::GetVideoMultiplexList( int nSourceID,
|
| 562 | 563 | pVideoMultiplex->setRollOff( query.value(19).toString() ); |
| 563 | 564 | pVideoMultiplex->setSIStandard( query.value(20).toString() ); |
| 564 | 565 | pVideoMultiplex->setServiceVersion( query.value(21).toInt() ); |
| 565 | | pVideoMultiplex->setUpdateTimeStamp( query.value(22).toDateTime() ); |
| | 566 | pVideoMultiplex->setUpdateTimeStamp( |
| | 567 | MythDate::as_utc(query.value(22).toDateTime())); |
| 566 | 568 | pVideoMultiplex->setDefaultAuthority( query.value(23).toString() ); |
| 567 | 569 | } |
| 568 | 570 | } |
| … |
… |
DTC::VideoMultiplex* Channel::GetVideoMultiplex( int nMplexID )
|
| 642 | 644 | pVideoMultiplex->setRollOff( query.value(18).toString() ); |
| 643 | 645 | pVideoMultiplex->setSIStandard( query.value(19).toString() ); |
| 644 | 646 | pVideoMultiplex->setServiceVersion( query.value(20).toInt() ); |
| 645 | | pVideoMultiplex->setUpdateTimeStamp( query.value(21).toDateTime() ); |
| | 647 | pVideoMultiplex->setUpdateTimeStamp( |
| | 648 | MythDate::as_utc(query.value(21).toDateTime())); |
| 646 | 649 | pVideoMultiplex->setDefaultAuthority( query.value(22).toString() ); |
| 647 | 650 | } |
| 648 | 651 | |
diff --git a/mythtv/programs/mythbackend/services/dvr.cpp b/mythtv/programs/mythbackend/services/dvr.cpp
index 9582bd4..fd36f2f 100644
|
a
|
b
|
|
| 37 | 37 | #include "jobqueue.h" |
| 38 | 38 | #include "encoderlink.h" |
| 39 | 39 | #include "remoteutil.h" |
| | 40 | #include "mythdate.h" |
| 40 | 41 | |
| 41 | 42 | #include "serviceUtil.h" |
| 42 | 43 | #include <mythscheduler.h> |
| … |
… |
DTC::ProgramList* Dvr::GetUpcomingList( int nStartIndex,
|
| 323 | 324 | for(; it < tmpList.end(); ++it) |
| 324 | 325 | { |
| 325 | 326 | if (!bShowAll && ((*it)->GetRecordingStatus() <= rsWillRecord) && |
| 326 | | ((*it)->GetRecordingStartTime() >= |
| 327 | | QDateTime::currentDateTime())) |
| | 327 | ((*it)->GetRecordingStartTime() >= MythDate::current())) |
| 328 | 328 | { |
| 329 | 329 | recordingList.push_back(new RecordingInfo(**it)); |
| 330 | 330 | } |
| 331 | | else if (bShowAll && ((*it)->GetRecordingStartTime() >= |
| 332 | | QDateTime::currentDateTime())) |
| | 331 | else if (bShowAll && |
| | 332 | ((*it)->GetRecordingStartTime() >= MythDate::current())) |
| 333 | 333 | { |
| 334 | 334 | recordingList.push_back(new RecordingInfo(**it)); |
| 335 | 335 | } |
| … |
… |
DTC::ProgramList* Dvr::GetUpcomingList( int nStartIndex,
|
| 359 | 359 | pPrograms->setStartIndex ( nStartIndex ); |
| 360 | 360 | pPrograms->setCount ( nCount ); |
| 361 | 361 | pPrograms->setTotalAvailable( recordingList.size() ); |
| 362 | | pPrograms->setAsOf ( QDateTime::currentDateTime() ); |
| | 362 | pPrograms->setAsOf ( MythDate::current() ); |
| 363 | 363 | pPrograms->setVersion ( MYTH_BINARY_VERSION ); |
| 364 | 364 | pPrograms->setProtoVer ( MYTH_PROTO_VERSION ); |
| 365 | 365 | |
| … |
… |
DTC::ProgramList* Dvr::GetConflictList( int nStartIndex,
|
| 383 | 383 | for(; it < tmpList.end(); ++it) |
| 384 | 384 | { |
| 385 | 385 | if (((*it)->GetRecordingStatus() == rsConflict) && |
| 386 | | ((*it)->GetRecordingStartTime() >= |
| 387 | | QDateTime::currentDateTime())) |
| | 386 | ((*it)->GetRecordingStartTime() >= MythDate::current())) |
| 388 | 387 | { |
| 389 | 388 | recordingList.push_back(new RecordingInfo(**it)); |
| 390 | 389 | } |
| … |
… |
DTC::ProgramList* Dvr::GetConflictList( int nStartIndex,
|
| 414 | 413 | pPrograms->setStartIndex ( nStartIndex ); |
| 415 | 414 | pPrograms->setCount ( nCount ); |
| 416 | 415 | pPrograms->setTotalAvailable( recordingList.size() ); |
| 417 | | pPrograms->setAsOf ( QDateTime::currentDateTime() ); |
| | 416 | pPrograms->setAsOf ( MythDate::current() ); |
| 418 | 417 | pPrograms->setVersion ( MYTH_BINARY_VERSION ); |
| 419 | 418 | pPrograms->setProtoVer ( MYTH_PROTO_VERSION ); |
| 420 | 419 | |
| … |
… |
DTC::RecRuleList* Dvr::GetRecordScheduleList( int nStartIndex,
|
| 578 | 577 | pRecRules->setStartIndex ( nStartIndex ); |
| 579 | 578 | pRecRules->setCount ( nCount ); |
| 580 | 579 | pRecRules->setTotalAvailable( recList.size() ); |
| 581 | | pRecRules->setAsOf ( QDateTime::currentDateTime() ); |
| | 580 | pRecRules->setAsOf ( MythDate::current() ); |
| 582 | 581 | pRecRules->setVersion ( MYTH_BINARY_VERSION ); |
| 583 | 582 | pRecRules->setProtoVer ( MYTH_PROTO_VERSION ); |
| 584 | 583 | |
diff --git a/mythtv/programs/mythbackend/services/myth.cpp b/mythtv/programs/mythbackend/services/myth.cpp
index b96d258..a0f449f 100644
|
a
|
b
|
DTC::LogMessageList *Myth::GetLogs( const QString &HostName,
|
| 496 | 496 | pLogMessage->setFilename( query.value(5).toString() ); |
| 497 | 497 | pLogMessage->setLine( query.value(6).toInt() ); |
| 498 | 498 | pLogMessage->setFunction( query.value(7).toString() ); |
| 499 | | pLogMessage->setTime( query.value(8).toDateTime() ); |
| | 499 | pLogMessage->setTime(MythDate::as_utc(query.value(8).toDateTime())); |
| 500 | 500 | pLogMessage->setLevel( logLevelGetName( |
| 501 | 501 | (LogLevel_t)query.value(9).toInt()) ); |
| 502 | 502 | pLogMessage->setMessage( query.value(10).toString() ); |
diff --git a/mythtv/programs/mythbackend/upnpcdstv.cpp b/mythtv/programs/mythbackend/upnpcdstv.cpp
index c0b8ff4..daae4b5 100644
|
a
|
b
|
void UPnpCDSTv::AddItem( const UPnpCDSRequest *pRequest,
|
| 285 | 285 | MSqlQuery &query ) |
| 286 | 286 | { |
| 287 | 287 | int nChanid = query.value( 0).toInt(); |
| 288 | | QDateTime dtStartTime = query.value( 1).toDateTime(); |
| 289 | | QDateTime dtEndTime = query.value( 2).toDateTime(); |
| | 288 | QDateTime dtStartTime = MythDate::as_utc(query.value(1).toDateTime()); |
| | 289 | QDateTime dtEndTime = MythDate::as_utc(query.value(2).toDateTime()); |
| 290 | 290 | QString sTitle = query.value( 3).toString(); |
| 291 | 291 | QString sSubtitle = query.value( 4).toString(); |
| 292 | 292 | QString sDescription = query.value( 5).toString(); |
| … |
… |
void UPnpCDSTv::AddItem( const UPnpCDSRequest *pRequest,
|
| 296 | 296 | uint64_t nFileSize = query.value( 9).toULongLong(); |
| 297 | 297 | QString sBaseName = query.value(10).toString(); |
| 298 | 298 | |
| 299 | | QDateTime dtProgStart = query.value(11).toDateTime(); |
| 300 | | QDateTime dtProgEnd = query.value(12).toDateTime(); |
| | 299 | QDateTime dtProgStart =MythDate::as_utc(query.value(11).toDateTime()); |
| | 300 | QDateTime dtProgEnd =MythDate::as_utc(query.value(12).toDateTime()); |
| 301 | 301 | QString sStorageGrp = query.value(13).toString(); |
| 302 | 302 | |
| 303 | 303 | // ---------------------------------------------------------------------- |
diff --git a/mythtv/programs/mythbackend/upnpcdsvideo.cpp b/mythtv/programs/mythbackend/upnpcdsvideo.cpp
index 99872fb..d328168 100644
|
a
|
b
|
void UPnpCDSVideo::AddItem( const UPnpCDSRequest *pRequest,
|
| 252 | 252 | // int nSeason = query.value(10).toInt(); |
| 253 | 253 | // int nEpisode = query.value(11).toInt(); |
| 254 | 254 | QString sCoverArt = query.value(12).toString(); |
| 255 | | QDateTime dtInsertDate = query.value(13).toDateTime(); |
| | 255 | QDateTime dtInsertDate =MythDate::as_utc(query.value(13).toDateTime()); |
| 256 | 256 | QString sHostName = query.value(14).toString(); |
| 257 | 257 | |
| 258 | 258 | // ---------------------------------------------------------------------- |