aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-08-14 17:47:13 +0200
committerKim Alvefur <zash@zash.se>2022-08-14 17:47:13 +0200
commit16331082a5d2de99ac6ded166cba305da9167454 (patch)
tree19debe35212d531a5926f304ed93c466ce86ad5b /plugins
parent50304f83fdb05d1fa56cd46215a248924b8642be (diff)
downloadprosody-16331082a5d2de99ac6ded166cba305da9167454.tar.gz
prosody-16331082a5d2de99ac6ded166cba305da9167454.zip
mod_time: Return sub-second precision timestamps
Because why not? Who even has this module enabled?
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_time.lua3
1 files changed, 2 insertions, 1 deletions
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