Make timezone config in version.conf

This commit is contained in:
Joshua
2022-07-21 21:12:40 +10:00
parent fea3d575b7
commit 93a1cc671f
3 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,6 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 # Puche 2021 pi.alert.application@gmail.com GNU GPLv3
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
TZ = 'Europe/London'
PIALERT_PATH = '/home/pi/pialert' PIALERT_PATH = '/home/pi/pialert'
DB_PATH = PIALERT_PATH + '/db/pialert.db' DB_PATH = PIALERT_PATH + '/db/pialert.db'

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

@@ -85,7 +85,7 @@ if ($ENABLED_DARKMODE === True) {
<!-- Servertime to the right of the hostname --> <!-- Servertime to the right of the hostname -->
<script> <script>
<?php <?php
$conf_file = '../config/pialert.conf'; $conf_file = '../config/version.conf';
$conf_data = parse_ini_file($conf_file); $conf_data = parse_ini_file($conf_file);
# set timezone for server time in header # set timezone for server time in header
date_default_timezone_set($conf_data['TZ']); date_default_timezone_set($conf_data['TZ']);