@@ -43,7 +43,7 @@ bool Logger::beginLog(QString path, bool autoLogging, QString fileName, bool tru
43
43
qDebug () << " File open" ;
44
44
45
45
if (autoLogging)
46
- openFile (path + " /" + QDateTime::currentDateTime ().toString (" dd.MM.yyyy_hh.mm.ss.zzz_ " ) + " Log" + fileName.right (fileName.length () - fileName.lastIndexOf (' .' )), truncateFile);
46
+ openFile (path + " /" + QDateTime::currentDateTimeUtc ().toString (" dd.MM.yyyy_hh.mm.ss.zzzZ_ " ) + " Log" + fileName.right (fileName.length () - fileName.lastIndexOf (' .' )), truncateFile);
47
47
else
48
48
openFile (path + " /" + fileName, truncateFile);
49
49
@@ -76,7 +76,7 @@ void Logger::writeLogTXTLine(QString lineToAppend, bool simplifyText)
76
76
if (simplifyText)
77
77
text = text.simplified ();
78
78
79
- text = QDateTime::currentDateTime ().toString (" hh:mm :ss:zzz " ) + text;
79
+ text = QDateTime::currentDateTimeUtc ().toString (" yyyy-MM-ddTHH:MM :ss.zzzZ " ) + text;
80
80
81
81
if (logFile != nullptr )
82
82
{
@@ -98,7 +98,7 @@ void Logger::writeLogTXTParsedData(QStringList labelList, QList<double> dataList
98
98
99
99
text = text.simplified ();
100
100
101
- text = QDateTime::currentDateTime ().toString (" hh:mm :ss:zzz " ) + text;
101
+ text = QDateTime::currentDateTimeUtc ().toString (" yyyy-MM-ddTHH:MM :ss.zzzZ " ) + text;
102
102
103
103
if (logFile != nullptr )
104
104
{
@@ -169,7 +169,7 @@ void Logger::writeLogCSV(QStringList labelList, QList<double> dataList, bool add
169
169
if (index >= 0 && index < dataList.count ())
170
170
out << QString::number (dataList[index ], ' f' ) + ' ,' ;
171
171
else if (csvLabelsBuffer[i] == " time" )
172
- out << QTime::currentTime ().toString (" hh:mm :ss:zzz " ) + ' ,' ;
172
+ out << QDateTime::currentDateTimeUtc ().toString (" yyyy-MM-ddTHH:MM :ss.zzzZ " ) + ' ,' ;
173
173
}
174
174
175
175
out << " \n " ;
0 commit comments