refs #849, use timestamp with server to indicate when login started

* CServer -> ITimestampBased
* added compare functions
This commit is contained in:
Klaus Basan
2017-01-05 02:14:40 +01:00
committed by Mathew Sutcliffe
parent 5f18707c9c
commit dcfaca431c
7 changed files with 111 additions and 29 deletions

View File

@@ -30,9 +30,15 @@ namespace BlackMisc
QDateTime ITimestampBased::getUtcTimestamp() const
{
if (this->m_timestampMSecsSinceEpoch < 0) { return QDateTime(); }
return QDateTime::fromMSecsSinceEpoch(this->m_timestampMSecsSinceEpoch, Qt::UTC);
}
void ITimestampBased::setTimestampToNull()
{
this->m_timestampMSecsSinceEpoch = -1;
}
void ITimestampBased::setByYearMonthDayHourMinute(const QString &yyyyMMddhhmmsszzz)
{
// yyyy MM dd hh mm ss zzz