From 16331082a5d2de99ac6ded166cba305da9167454 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 14 Aug 2022 17:47:13 +0200 Subject: mod_time: Return sub-second precision timestamps Because why not? Who even has this module enabled? --- plugins/mod_time.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_time.lua b/plugins/mod_time.lua index 0cd5a4ea..72421f85 100644 --- a/plugins/mod_time.lua +++ b/plugins/mod_time.lua @@ -8,6 +8,7 @@ local st = require "util.stanza"; local datetime = require "util.datetime".datetime; +local now = require "util.time".now; local legacy = require "util.datetime".legacy; -- XEP-0202: Entity Time @@ -18,7 +19,7 @@ local function time_handler(event) local origin, stanza = event.origin, event.stanza; origin.send(st.reply(stanza):tag("time", {xmlns="urn:xmpp:time"}) :tag("tzo"):text("+00:00"):up() -- TODO get the timezone in a platform independent fashion - :tag("utc"):text(datetime())); + :tag("utc"):text(datetime(now()))); return true; end -- cgit v1.2.3