diff --git a/inc/config.php b/inc/config.php index c85ca039..eaeac0b0 100644 --- a/inc/config.php +++ b/inc/config.php @@ -443,9 +443,10 @@ // Inline expanding of images with Javascript $config['inline_expanding'] = true; - // The string passed to date() for post times - // http://php.net/manual/en/function.date.php + // The format string passed to strftime() for post times + // http://www.php.net/manual/en/function.strftime.php $config['post_date'] = 'm/d/y (D) H:i:s'; + $config['post_date'] = '%m/%d/%y (%a) %H:%M:%S'; // The names on the post buttons. (On most imageboards, these are both "Post") $config['button_newtopic'] = 'New Topic'; diff --git a/inc/contrib/Twig/Extensions/Extension/Tinyboard.php b/inc/contrib/Twig/Extensions/Extension/Tinyboard.php index 3540c1a3..93bda9f3 100644 --- a/inc/contrib/Twig/Extensions/Extension/Tinyboard.php +++ b/inc/contrib/Twig/Extensions/Extension/Tinyboard.php @@ -40,7 +40,7 @@ function twig_remove_whitespace_filter($data) { } function twig_date_filter($date, $format) { - return date($format, $date); + return strftime($format, $date); } function twig_hasPermission_filter($mod, $permission, $board) { diff --git a/mod.php b/mod.php index fd65abd7..016aed41 100644 --- a/mod.php +++ b/mod.php @@ -105,7 +105,7 @@ utf8tohtml($notice['username']) : '???') . ' at ' . - date($config['post_date'], $notice['time']) . + strftime($config['post_date'], $notice['time']) . ''; } if(!empty($_body)) { @@ -597,7 +597,7 @@ '???' ) . ' at ' . - date($config['post_date'], $notice['time']) . + strftime($config['post_date'], $notice['time']) . '

' . $notice['body'] . '

'; } @@ -679,7 +679,7 @@ ' — by ' . $news['name'] . ' at ' . - date($config['post_date'], $news['time']) . + strftime($config['post_date'], $news['time']) . '

' . $news['body'] . '

'; } @@ -706,7 +706,7 @@ $body .= '' . '' . $pm['id'] . '' . '' . $pm['username'] . '' . - '' . date($config['post_date'], $pm['time']) . '' . + '' . strftime($config['post_date'], $pm['time']) . '' . '' . pm_snippet($pm['message']) . '' . ''; @@ -791,7 +791,7 @@ '' : '') . - 'Date ' . date($config['post_date'], $pm['time']) . '' . + 'Date ' . strftime($config['post_date'], $pm['time']) . '' . 'Message ' . $pm['message'] . '' . @@ -1327,7 +1327,7 @@ '
' . 'Board: ' . sprintf($config['board_abbreviation'], $report['uri']) . '
' . 'Reason: ' . $report['reason'] . '
' . - 'Report date: ' . date($config['post_date'], $report['time']) . '
' . + 'Report date: ' . strftime($config['post_date'], $report['time']) . '
' . (hasPermission($config['mod']['show_ip']) ? 'Reported by: ' . $report['ip'] . '
' : '') . @@ -1559,14 +1559,14 @@ ) . '' . // Set - '' . date($config['post_date'], $ban['set']) . '' . + '' . strftime($config['post_date'], $ban['set']) . '' . // Expires '' . ($ban['expires'] == 0 ? 'Never' : - date($config['post_date'], $ban['expires']) + strftime($config['post_date'], $ban['expires']) ) . '' . @@ -2481,7 +2481,7 @@ '' . $note['body'] . '' . - date($config['post_date'], $note['time']) . + strftime($config['post_date'], $note['time']) . '' . (hasPermission($config['mod']['remove_notes']) ? '[delete]' @@ -2550,14 +2550,14 @@ '' . // Set - 'Set' . date($config['post_date'], $ban['set']) . '' . + 'Set' . strftime($config['post_date'], $ban['set']) . '' . // Expires 'Expires' . ($ban['expires'] == 0 ? 'Never' : - date($config['post_date'], $ban['expires']) + strftime($config['post_date'], $ban['expires']) ) . '' . diff --git a/templates/post_reply.html b/templates/post_reply.html index b051bd6b..14ce611c 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -29,7 +29,7 @@ {% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %} [{{ post.ip }}] {% endif %} - + {% if config.poster_ids %} ID: {{ post.ip|poster_id(post.thread) }} diff --git a/templates/post_thread.html b/templates/post_thread.html index f04ad283..1fe65cad 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -73,7 +73,7 @@ {% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %} [{{ post.ip }}] {% endif %} - + {% if config.poster_ids %} ID: {{ post.ip|poster_id(post.id) }}