# HG changeset patch # User Kim Alvefur # Date 1660492033 -7200 # Node ID 70ae68bb0aa5b288552d8bf0aabedccbf32b1183 # Parent 9524bb7f3944b0cc23e1aeb728771b90095f33d9 mod_time: Return sub-second precision timestamps Because why not? Who even has this module enabled? diff -r 9524bb7f3944 -r 70ae68bb0aa5 plugins/mod_time.lua --- a/plugins/mod_time.lua Sun Aug 14 17:29:39 2022 +0200 +++ b/plugins/mod_time.lua Sun Aug 14 17:47:13 2022 +0200 @@ -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 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