add timezone to servertime

This commit is contained in:
Joshua
2022-07-21 13:12:39 +10:00
parent 0713c37a65
commit 1065bcda00
3 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
VERSION = '3.5_leiweibau' VERSION = '3.5_leiweibau'
VERSION_YEAR = '2022' VERSION_YEAR = '2022'
VERSION_DATE = '2022-07-07' VERSION_DATE = '2022-07-07'
TZ = 'Europe/London'

View File

@@ -678,7 +678,7 @@ input[type="password"]::-webkit-caps-lock-indicator {
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
} }
.small-box > .inner h3 { .small-box > .inner h3, .small-box > .inner p {
margin-bottom: 0px; margin-bottom: 0px;
margin-left: 0px; margin-left: 0px;
} }

View File

@@ -84,6 +84,11 @@ if ($ENABLED_DARKMODE === True) {
<!-- Servertime to the right of the hostname --> <!-- Servertime to the right of the hostname -->
<script> <script>
<?php
$conf_file = '../config/version.conf';
$conf_data = parse_ini_file($conf_file);
date_default_timezone_set($conf_data['TZ']);
?>
var pia_servertime = new Date(<?php echo date("Y, n, j, G, i, s") ?>); var pia_servertime = new Date(<?php echo date("Y, n, j, G, i, s") ?>);
function show_pia_servertime() { function show_pia_servertime() {