From 4018c0041b179bbd03f152c43ab0e70dbf00a9f0 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Tue, 26 Jul 2016 01:47:44 +0300 Subject: [PATCH] feat(main): Changed time in logs on UTC. Fix #3554. --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8ddfd84b0..5d7ae8dd5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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: