Index: source/lobby/XmppClient.cpp =================================================================== --- source/lobby/XmppClient.cpp +++ source/lobby/XmppClient.cpp @@ -936,8 +936,15 @@ if (!msg.when()) return std::time(nullptr); - // The locale is irrelevant, because the XMPP date format doesn't contain written month names - return g_L10n.ParseDateTime(msg.when()->stamp().to_string(), "Y-M-d'T'H:m:sZ", Locale::getUS()) / 1000.0; + // XEP-0082 allows timestamps with or without microseconds, so handle both + for (std::string format : {"Y-M-d'T'H:m:s.SZ", "Y-M-d'T'H:m:sZ"}) + { + // The locale is irrelevant, because the XMPP date format doesn't contain written month names + UDate dateTime = g_L10n.ParseDateTime(msg.when()->stamp().to_string(), format, Locale::getUS()); + if (dateTime) + return dateTime / 1000.0; + } + return std::time(nullptr); } /**