/***************************************************************************
- * Copyright (C) 2005-2019 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
qDebug() << "IRC net" << net->networkId() << "<<" << tags << prefix << cmd << params;
}
+ if (net->capEnabled(IrcCap::SERVER_TIME) && tags.contains(IrcTags::SERVER_TIME)) {
+ QDateTime serverTime = QDateTime::fromString(tags[IrcTags::SERVER_TIME], "yyyy-MM-ddThh:mm:ss.zzzZ");
+ serverTime.setTimeSpec(Qt::UTC);
+ if (serverTime.isValid()) {
+ e->setTimestamp(serverTime);
+ } else {
+ qDebug() << "Invalid timestamp from server-time tag:" << tags[IrcTags::SERVER_TIME];
+ }
+ }
+
QList<Event*> events;
EventManager::EventType type = EventManager::Invalid;