Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat(main): Changed time in logs on UTC.
Browse files Browse the repository at this point in the history
Fix #3554.
  • Loading branch information
Diadlo committed Jul 26, 2016
1 parent e6e666f commit 4018c00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt
&& msg == QString("QFSFileEngine::open: No file name specified"))
return;

QString LogMsg = QString("[%1] %2:%3 : ")
.arg(QTime::currentTime().toString("HH:mm:ss.zzz")).arg(ctxt.file).arg(ctxt.line);
// Time should be in UTC to save user privacy on log sharing
QTime time = QDateTime::currentDateTime().toUTC().time();
QString LogMsg = QString("[%1 UTC] %2:%3 : ")
.arg(time.toString("HH:mm:ss.zzz")).arg(ctxt.file).arg(ctxt.line);
switch (type)
{
case QtDebugMsg:
Expand Down

0 comments on commit 4018c00

Please sign in to comment.