From 827fe5087774ec8028962e7c900a51bc4ab81135 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 22 Dec 2016 13:08:07 +0000 Subject: [PATCH] Automatically adjust timezone --- conf/config_local.php | 2 +- scripts/install | 3 +++ scripts/upgrade | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/config_local.php b/conf/config_local.php index d3ebe26..c797a39 100644 --- a/conf/config_local.php +++ b/conf/config_local.php @@ -24,7 +24,7 @@ $config['cops_recentbooks_limit'] = '10'; - $config['default_timezone'] = "Europe/London"; + $config['default_timezone'] = "TIMEZONETOCHANGE"; $config['cops_template'] = 'default'; diff --git a/scripts/install b/scripts/install index 5a6ecc8..ce5e447 100755 --- a/scripts/install +++ b/scripts/install @@ -59,6 +59,9 @@ sudo mkdir -p $final_path # Site adjustments sudo cp ../conf/config_local.php ../sources/ sed -i "s@CALIBRETOCHANGE@$calibrepath@g" ../sources/config_local.php +timezone=`sudo cat /etc/timezone`; +sed -i "s@TIMEZONETOCHANGE@$calibrepath@g" ../sources/config_local.php + # To be done : make it an if loop diff --git a/scripts/upgrade b/scripts/upgrade index d378f69..d6eed69 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,6 +72,8 @@ sudo mkdir -p $final_path # Site adjustments sudo cp ../conf/config_local.php ../sources/ sed -i "s@CALIBRETOCHANGE@$calibrepath@g" ../sources/config_local.php +timezone=`sudo cat /etc/timezone`; +sed -i "s@TIMEZONETOCHANGE@$calibrepath@g" ../sources/config_local.php # Base site sudo cp -a ../sources/* $final_path/