Changeset

12633:5d8b0e0b9d48

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
author Kim Alvefur <zash@zash.se>
date Wed, 17 Aug 2022 18:07:31 +0200
parents 12632:70ae68bb0aa5
children 12634:8cb6644ce463
files util/datetime.lua
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/datetime.lua	Sun Aug 14 17:47:13 2022 +0200
+++ b/util/datetime.lua	Wed Aug 17 18:07:31 2022 +0200
@@ -46,8 +46,7 @@
 
 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