# HG changeset patch
# User aidan@jmad.org
# Date 1712206563 25200
# Node ID 9eb08161684272018a8620384cf1a8bc38574dd6
# Parent  d5a9847b0e554305d90db273dad037d1f678ad9e
mod_admin_shell: Add connection created time

This adds an output format option to show the time that the connection was created.

Ref #1852

diff -r d5a9847b0e55 -r 9eb081616842 plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Thu Apr 04 19:44:17 2024 +0200
+++ b/plugins/mod_admin_shell.lua	Wed Apr 03 21:56:03 2024 -0700
@@ -867,6 +867,18 @@
 			end
 		end;
 	};
+	created = {
+		title = "Connection Created";
+		description = "Time when connection was created";
+		width = #"YYYY MM DD HH:MM:SS";
+		align = "right";
+		key = "conn";
+		mapper = function(conn)
+			if conn then
+				return os.date("%F %T", math.floor(conn.created));
+			end
+		end;
+	};
 	dir = {
 		title = "Dir";
 		description = "Direction of server-to-server connection";