Software /
code /
verse
Diff
doc/example_carbons.lua @ 287:762511350532
doc/example_carbons.lua: Update to reflect timestamp change in carbons plugin.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Mar 2012 16:00:16 +0100 |
parent | 260:7f6df45a3d1f |
line wrap: on
line diff
--- a/doc/example_carbons.lua Sat Mar 17 15:59:43 2012 +0100 +++ b/doc/example_carbons.lua Sat Mar 17 16:00:16 2012 +0100 @@ -1,6 +1,8 @@ local xmlns_carbons = "urn:xmpp:carbons:1"; local xmlns_forward = "urn:xmpp:forward:0"; +local function datetime(t) return os_date("!%Y-%m-%dT%H:%M:%SZ", t); end + -- This line squishes verse each time you run, -- handy if you're hacking on Verse itself --os.execute("squish --minify-level=none verse"); @@ -24,7 +26,7 @@ c:hook("carbon", function(carbon) local dir, ts, st = carbon.dir, carbon.timestamp, carbon.stanza; - print("", ts, dir:upper()); + print("", datetime(ts), dir:upper()); print(st); end);