function bb2_convertdate in Bad Behavior 7.2
Same name and namespace in other branches
- 5.2 badbehavior.module \bb2_convertdate()
- 6.2 badbehavior.module \bb2_convertdate()
- 6 badbehavior.module \bb2_convertdate()
Converts dates in BB log screen output to server's time zone.
Parameters
$bbdate:
Return value
string
2 calls to bb2_convertdate()
- badbehavior_event in ./
badbehavior.admin.inc - Builds the "Details" table displaying data about an individual log entry
- badbehavior_overview in ./
badbehavior.admin.inc - Builds the log table seen in the /admin/reports/badbehavior/ page.
File
- ./
badbehavior.module, line 241 - Integrates Bad Behavior with Drupal
Code
function bb2_convertdate($bbdate) {
$timestamp = strtotime($bbdate . ' UTC');
if (variable_get('badbehavior_log_timeformat', '24') == '24') {
return format_date($timestamp, 'custom', 'Y-m-d H:i:s');
}
else {
return format_date($timestamp, 'custom', 'Y-m-d g:i:s a');
}
}