Add TINYIB_TIMEZONE, resolves #48

This commit is contained in:
Trevor Slocum 2018-02-14 22:19:53 -08:00
parent 2cbdbb9eff
commit 013de06804
3 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,10 @@ foreach ($includes as $include) {
include $include;
}
if (TINYIB_TIMEZONE != '') {
date_default_timezone_set(TINYIB_TIMEZONE);
}
$redirect = true;
// Check if the request is to make a post
if (isset($_POST['message']) || isset($_POST['file'])) {

View File

@ -33,6 +33,9 @@ if (!defined('TINYIB_REQMOD')) {
if (!defined('TINYIB_ALWAYSNOKO')) {
define('TINYIB_ALWAYSNOKO', false);
}
if (!defined('TINYIB_TIMEZONE')) {
define('TINYIB_TIMEZONE', '');
}
if (!defined('TINYIB_DBMIGRATE')) {
define('TINYIB_DBMIGRATE', false);
}

View File

@ -24,6 +24,7 @@ define('TINYIB_LOGO', ''); // Logo HTML
define('TINYIB_THREADSPERPAGE', 10); // Amount of threads shown per index page
define('TINYIB_PREVIEWREPLIES', 3); // Amount of replies previewed on index pages
define('TINYIB_TRUNCATE', 15); // Messages are truncated to this many lines on board index pages [0 to disable]
define('TINYIB_TIMEZONE', 'UTC'); // See https://secure.php.net/manual/en/timezones.php - e.g. America/Los_Angeles
// Post control
define('TINYIB_DELAY', 30); // Delay (in seconds) between posts from the same IP address to help control flooding [0 to disable]