[08/19] ovpnclients.dat: Convert timestamps into localtime.

Message ID 20200413074550.2735-8-stefan.schantl@ipfire.org
State Accepted
Commit 1242cb0134ee9008b613a56957dbf7fe3f4b6b3d
Headers show
Series [01/19] openvpn: Add WUI page for client usage statistics | expand

Commit Message

Stefan Schantl April 13, 2020, 7:45 a.m. UTC
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 html/cgi-bin/logs.cgi/ovpnclients.dat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/html/cgi-bin/logs.cgi/ovpnclients.dat b/html/cgi-bin/logs.cgi/ovpnclients.dat
index 33d6d8717..cf3e0e7bc 100755
--- a/html/cgi-bin/logs.cgi/ovpnclients.dat
+++ b/html/cgi-bin/logs.cgi/ovpnclients.dat
@@ -123,7 +123,7 @@  my $database_query = qq(
 
 if ($cgiparams{'CONNECTION_NAME'}) {
 	$database_query = qq(
-		SELECT * FROM sessions
+		SELECT common_name, DATETIME(connected_at, 'localtime'), DATETIME(disconnected_at, 'localtime'), bytes_received, bytes_sent FROM sessions
 		WHERE
 			common_name = '$cgiparams{"CONNECTION_NAME"}'
 			AND (