Small changes, fixed rare timezone issue

Fixed error: “date(): It is not safe to rely on the system's timezone
settings…”
This commit is contained in:
Wruczek 2016-10-12 21:57:49 +02:00
parent ac2a64fa6d
commit ca6a719247
5 changed files with 8 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
config/config.php config/config.php
prototypes/ prototypes/
admin/
# PhpStorm # PhpStorm
.idea/ .idea/

View File

@ -6,6 +6,8 @@ set_error_handler("exception_error_handler", E_ALL);
require_once __DIR__ . "/../include/tsutils.php"; require_once __DIR__ . "/../include/tsutils.php";
require_once __DIR__ . "/../lib/phpfastcache/autoload.php"; require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
date_default_timezone_set($config["general"]["timezone"]);
use phpFastCache\Util; use phpFastCache\Util;
use phpFastCache\CacheManager; use phpFastCache\CacheManager;
@ -48,8 +50,8 @@ function scriptFail($error) {
die(json_encode(array( die(json_encode(array(
"success" => false, "success" => false,
"id" => "script_error", "id" => "script_error",
"message" => "There has been an error while retrieving the server status" "message" => "There has been an error while retrieving the server status",
,"error" => $error "error" => $error
))); )));
} }

View File

@ -55,7 +55,7 @@ if (is_null($banlist)) {
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<?php tl($lang["banlist"]["lastupdate"], [$banlist[1]]); ?><!-- <span style="float: right">Podgląd odświerza się co 60 sekund</span> --> <?php tl($lang["banlist"]["lastupdate"], [$banlist[1]]); ?><!-- <span style="float: right">Podgląd odświeża się co 60 sekund</span> -->
</div> </div>
</div> </div>

View File

@ -16,6 +16,7 @@ $config["general"]["icon"] = "img/icon/icon-32.png";
$config["general"]["subtitle"] = " - Best TeamSpeak server!"; // Website subtitle $config["general"]["subtitle"] = " - Best TeamSpeak server!"; // Website subtitle
$config["general"]["desc"] = "Polski serwer TeamSpeak! Zapraszamy :)"; // Website description - displayed in Google search engine $config["general"]["desc"] = "Polski serwer TeamSpeak! Zapraszamy :)"; // Website description - displayed in Google search engine
$config["general"]["newsDir"] = "config/news"; // News folder (relative to project folder) $config["general"]["newsDir"] = "config/news"; // News folder (relative to project folder)
$config["general"]["timezone"] = "Europe/Warsaw"; // Your timezone - http://php.net/manual/en/timezones.php
$config["general"]["enablehta"] = false; // Enable / Disable additional website features (recommended, but $config["general"]["enablehta"] = false; // Enable / Disable additional website features (recommended, but
// you need to have up-to-date version of Apache and install mod_rewrite) // you need to have up-to-date version of Apache and install mod_rewrite)

View File

@ -42,7 +42,7 @@ function getViewer() {
<?php echo $tsviewer[0]; ?> <?php echo $tsviewer[0]; ?>
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<?php tl($lang["viewer"]["lastupdate"], [$tsviewer[1]]); ?><!-- <span style="float: right">Podgląd odświerza się co 30 sekund</span> --> <?php tl($lang["viewer"]["lastupdate"], [$tsviewer[1]]); ?><!-- <span style="float: right">Podgląd odświeża się co 30 sekund</span> -->
</div> </div>
</div> </div>