Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php |
— | — | @@ -173,8 +173,9 @@ |
174 | 174 | public static function DeleteOld() { |
175 | 175 | global $wgOnlineStatusBar_LogoutTime; |
176 | 176 | $dbw = wfGetDB( DB_MASTER ); |
177 | | - $time = $dbw->timestamp() - $wgOnlineStatusBar_LogoutTime; |
178 | | - $dbw->delete( 'online_status', array( "timestamp < " . $dbw->addQuotes( $time ) ), __METHOD__ ); |
| 177 | + // calculate time and convert it back to mediawiki format |
| 178 | + $time = wfTimestamp( TS_UNIX ) - $wgOnlineStatusBar_LogoutTime; |
| 179 | + $dbw->delete( 'online_status', array( "timestamp < " . $dbw->addQuotes( $dbw->timestamp( $time ) ) ), __METHOD__ ); |
179 | 180 | return 0; |
180 | 181 | } |
181 | 182 | |