mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 19:50:45 +00:00
Remove tabs in Viatom loader and normalize whitespace to OSCAR convensions.
Also change from using sprintf/QDateTime::fromString to using Qt native objects. No change in output.
This commit is contained in:
parent
9cb7de950b
commit
ae8ce0e9d6
@ -1,6 +1,7 @@
|
||||
/* SleepLib Viatom Loader Implementation
|
||||
*
|
||||
* Copyright (c) 2019 The OSCAR Team (written by dave madden <dhm@mersenne.com>)
|
||||
* Copyright (c) 2019-2020 The OSCAR Team
|
||||
* (Initial importer written by dave madden <dhm@mersenne.com>)
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file COPYING in the main directory of the source code
|
||||
@ -81,10 +82,7 @@ Session* ViatomLoader::ParseFile(const QString & filename)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
char dchr[32];
|
||||
sprintf( dchr, "%02u/%02u/%04u %02u:%02u:%02u", m, d, Y, H, M, S );
|
||||
|
||||
QDateTime data_timestamp = QDateTime::fromString( QString( dchr ), "MM/dd/yyyy HH:mm:ss" );
|
||||
QDateTime data_timestamp = QDateTime(QDate(Y, m, d), QTime(H, M, S));
|
||||
quint64 time_s = data_timestamp.toTime_t();
|
||||
quint64 time_ms = time_s * 1000L;
|
||||
SessionID sid = time_s;
|
||||
|
Loading…
Reference in New Issue
Block a user