diff options
author | Kim Alvefur <zash@zash.se> | 2022-08-17 18:07:31 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-08-17 18:07:31 +0200 |
commit | 68867c09d6c6298fcbea882b884005dbb8aa2792 (patch) | |
tree | 70ecca301b5e2b9a72df6111da3b318e66234c6b | |
parent | 16331082a5d2de99ac6ded166cba305da9167454 (diff) | |
download | prosody-68867c09d6c6298fcbea882b884005dbb8aa2792.tar.gz prosody-68867c09d6c6298fcbea882b884005dbb8aa2792.zip |
util.datetime: Remove a line
No idea why the locals were declared on a line by itself. Perhaps line
length considerations? But saving 6 characters in width by adding a
whole line with 47 characters seems excessive.
This is still within the 150 character limit set by .luacheckrc
-rw-r--r-- | util/datetime.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/util/datetime.lua b/util/datetime.lua index 8fa1a778..6df146f4 100644 --- a/util/datetime.lua +++ b/util/datetime.lua @@ -46,8 +46,7 @@ end local function parse(s) if s then - local year, month, day, hour, min, sec, tzd; - year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d%.?%d*)([Z+%-]?.*)$"); + local year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d%.?%d*)([Z+%-]?.*)$"); if year then local now = os_time(); local time_offset = os_difftime(os_time(os_date("*t", now)), os_time(os_date("!*t", now))); -- to deal with local timezone |