Software /
code /
prosody
Changeset
12632:70ae68bb0aa5
mod_time: Return sub-second precision timestamps
Because why not? Who even has this module enabled?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 14 Aug 2022 17:47:13 +0200 |
parents | 12631:9524bb7f3944 |
children | 12633:5d8b0e0b9d48 |
files | plugins/mod_time.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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