doc/example_carbons.lua: Update to reflect timestamp change in carbons plugin.

Sat, 17 Mar 2012 16:00:16 +0100

author
Kim Alvefur <zash@zash.se>
date
Sat, 17 Mar 2012 16:00:16 +0100
changeset 287
762511350532
parent 286
04b6c060ff01
child 288
22544dcf0579

doc/example_carbons.lua: Update to reflect timestamp change in carbons plugin.

doc/example_carbons.lua file | annotate | diff | comparison | revisions
--- 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);
 

mercurial