]> Pileus Git - ~andy/lamechat/blobdiff - xmpp.c
Fix timestamps
[~andy/lamechat] / xmpp.c
diff --git a/xmpp.c b/xmpp.c
index b0fd68ad5968b4f0983edd34f60ef7cf94f283dc..1e704fae6eaa42ff7e04b53dca71b30df942e6f2 100644 (file)
--- a/xmpp.c
+++ b/xmpp.c
@@ -512,8 +512,8 @@ static void xmpp_run(xmpp_server_t *srv,
                        const char *ts = find_attr(attrs, "stamp");
                        if (ts) {
                                struct tm tm = {};
-                               strptime(ts, "%Y-%m-%dT%H:%M:%S%z", &tm);
-                               srv->stamp = mktime(&tm);
+                               strptime(ts, "%Y-%m-%dT%H:%M:%S", &tm);
+                               srv->stamp = timegm(&tm);
                        }
                }
                if (match(end, "body")) {