summaryrefslogtreecommitdiffstats
path: root/database/sqlite/administration/attempts.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2012-10-07 16:50:42 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-10-08 02:18:14 +0200
commit3af4f9b2bacfc8383001bba95c4f3836a6cecca6 (patch)
tree7138162c2b371f2a1743b9cafc64fb5ed9a3f855 /database/sqlite/administration/attempts.c
parent79b7a8c5ad5d4de6fc69d71585625b8a74198c47 (diff)
downloadeurephia-3af4f9b2bacfc8383001bba95c4f3836a6cecca6.tar.gz
eurephia-3af4f9b2bacfc8383001bba95c4f3836a6cecca6.tar.xz
eurephia-3af4f9b2bacfc8383001bba95c4f3836a6cecca6.zip
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 <dazo@users.sourceforge.net>
Diffstat (limited to 'database/sqlite/administration/attempts.c')
-rw-r--r--database/sqlite/administration/attempts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/database/sqlite/administration/attempts.c b/database/sqlite/administration/attempts.c
index d296172..c884b4e 100644
--- a/database/sqlite/administration/attempts.c
+++ b/database/sqlite/administration/attempts.c
@@ -67,7 +67,7 @@ xmlDoc *attempts_list(eurephiaCTX *ctx, eDBfieldMap *fmap) {
// Query the database for registered attempts
res = sqlite_query_mapped(ctx, SQL_SELECT,
"SELECT username, lower(digest), remoteip, attempts,"
- " registered, last_attempt, atpid"
+ " locdt(registered), locdt(last_attempt), atpid"
" FROM openvpn_attempts",
NULL, fmap, "atpid");
if( sqlite_query_status(res) != dbSUCCESS ) {