Permalink
Browse files

Small changes, fixed rare timezone issue

Fixed error: “date(): It is not safe to rely on the system's timezone
settings…”
  • Loading branch information...
1 parent ac2a64f commit ca6a7192470687a67e30f06726d64967ac9d3819 @Wruczek committed Oct 12, 2016
Showing with 8 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +4 −2 api/status.php
  3. +1 −1 bans.php
  4. +1 −0 config/config.template.php
  5. +1 −1 viewer.php
View
@@ -1,5 +1,6 @@
config/config.php
prototypes/
+admin/
# PhpStorm
.idea/
View
@@ -6,6 +6,8 @@
require_once __DIR__ . "/../include/tsutils.php";
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
+date_default_timezone_set($config["general"]["timezone"]);
+
use phpFastCache\Util;
use phpFastCache\CacheManager;
@@ -48,8 +50,8 @@ function scriptFail($error) {
die(json_encode(array(
"success" => false,
"id" => "script_error",
- "message" => "There has been an error while retrieving the server status"
- ,"error" => $error
+ "message" => "There has been an error while retrieving the server status",
+ "error" => $error
)));
}
View
@@ -55,7 +55,7 @@
</div>
<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>
@@ -16,6 +16,7 @@
$config["general"]["subtitle"] = " - Best TeamSpeak server!"; // Website subtitle
$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"]["timezone"] = "Europe/Warsaw"; // Your timezone - http://php.net/manual/en/timezones.php
$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)
View
@@ -42,7 +42,7 @@ function getViewer() {
<?php echo $tsviewer[0]; ?>
</div>
<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>

0 comments on commit ca6a719

Please sign in to comment.