From 3af4f9b2bacfc8383001bba95c4f3836a6cecca6 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sun, 7 Oct 2012 16:50:42 +0200 Subject: sqlite/admin: Report all timestamp fields with localtime instead of UTC/GMT Made all SELECT queries which is used for reports to use the new 'locdt' SQL function on timestamp fields. This converts the UTC/GMT timestamps stored in the database to the correct timezone of the running admin client. Signed-off-by: David Sommerseth --- database/sqlite/administration/lastlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'database/sqlite/administration/lastlog.c') diff --git a/database/sqlite/administration/lastlog.c b/database/sqlite/administration/lastlog.c index ff7b479..2fc2904 100644 --- a/database/sqlite/administration/lastlog.c +++ b/database/sqlite/administration/lastlog.c @@ -94,7 +94,8 @@ xmlDoc *eDBadminGetLastlog(eurephiaCTX *ctx, xmlDoc *srch_xml, const char *sortk res = sqlite_query_mapped(ctx, SQL_SELECT, "SELECT llid, ll.certid, protocol, remotehost, remoteport, macaddr," " vpnipaddr, vpnipmask, sessionstatus, sessionkey," - " login, logout, session_duration, session_deleted," + " locdt(login), locdt(logout)," + " session_duration, locdt(session_deleted)," " bytes_sent, bytes_received, uicid, accessprofile," " access_descr, fw_profile, depth, lower(digest)," " common_name, organisation, email, username, ll.uid" -- cgit