forked from jtdx-project/jtdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJTDXDateTime.cpp
42 lines (31 loc) · 1.1 KB
/
JTDXDateTime.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// JTDXDateTime to manipulate system clock time
//
//Created by Arvo, ES1JA 2020
#include "JTDXDateTime.h"
JTDXDateTime::JTDXDateTime() : QDateTime {}
{}
JTDXDateTime::JTDXDateTime(QDateTime &&other) : QDateTime {other}
{}
JTDXDateTime::JTDXDateTime(const QDateTime &other) : QDateTime {other}
{}
JTDXDateTime::JTDXDateTime(const QDate &date, const QTime &time, const QTimeZone &timeZone) : QDateTime {date,time,timeZone}
{}
JTDXDateTime::JTDXDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds) : QDateTime {date,time,spec,offsetSeconds}
{}
JTDXDateTime::JTDXDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec) : QDateTime {date,time,spec}
{}
JTDXDateTime::JTDXDateTime(const QDate &date) : QDateTime {date}
{}
qint64 JTDXDateTime::currentMSecsSinceEpoch2()
{
return offset_ + QDateTime::currentMSecsSinceEpoch();
}
QDateTime JTDXDateTime::currentDateTimeUtc2()
{
return QDateTime::currentDateTimeUtc().addMSecs(offset_); //result;
}
QDateTime JTDXDateTime::currentDateTime2()
{
return QDateTime::currentDateTime().addMSecs(offset_); //result;
}