mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
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
This commit is contained in:
parent
16331082a5
commit
68867c09d6
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue