+ 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];
+ }
+ }
+