Changeset

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
parents 286:04b6c060ff01
children 288:22544dcf0579
files doc/example_carbons.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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);