Ticket #357 (closed Bug report: duplicate)
Wrong display of start of connection time
Reported by: | leandro@… | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Not yet assigned to a Milestone |
Component: | Auth server, Statistics and reporting | Version: | |
Keywords: | Cc: |
Description
I just notice the "Date" field in the connection statistics is wrong, displaying 6 hours before the correct date and time. In the database the data is correct, but it is displayed wrong.
Here the little patch to the file wifidog/classes/StatisticReport/ConnectionLog.php
--- ConnectionLog.php.orig 2007-07-17 15:38:23.000000000 +0200 +++ ConnectionLog.php 2007-07-24 18:25:10.000000000 +0200 @@ -148,7 +148,7 @@ $html .= "</table>"; $html .= "</fieldset>"; - $candidate_connections_sql = $this->stats->getSqlCandidateConnectionsQuery("users.username, nodes.name, EXTRACT('EPOCH' FROM date_trunc('second',timestamp_out-timestamp_in)) AS time_spent, EXTRACT('EPOCH' FROM timestamp_in) AS timestamp_in, connections.user_id, user_mac ", true); + $candidate_connections_sql = $this->stats->getSqlCandidateConnectionsQuery("users.username, nodes.name, EXTRACT('EPOCH' FROM date_trunc('second',timestamp_out-timestamp_in)) AS time_spent, timestamp_in, connections.user_id, user_mac ", true); $sql = "$candidate_connections_sql ORDER BY timestamp_in DESC"; $db->execSql($sql, $rows, false); @@ -181,7 +181,7 @@ $html .= " <td>{$row['name']}</td>\n"; $html .= " <td>{$row['username']}</td>\n"; $html .= " <td>{$row['user_mac']}</td>\n"; - $html .= " <td>".strftime("%c", $row['timestamp_in'])."</td>\n"; + $html .= " <td>".strftime("%Y-%m-%d %H:%M:%S", strtotime($row['timestamp_in']))."</td>\n"; $html .= " <td>"; if (!empty ($row['time_spent']))
Change History
Note: See
TracTickets for help on using
tickets.