# HG changeset patch # User Kim Alvefur # Date 1331996416 -3600 # Node ID 762511350532ab006219368ed9209ae9310e3a47 # Parent 04b6c060ff015d476214709a1ca826b3d8d7eb13 doc/example_carbons.lua: Update to reflect timestamp change in carbons plugin. diff -r 04b6c060ff01 -r 762511350532 doc/example_carbons.lua --- 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);