Browse Source

Fixes PHP timezone issue

bugfixes
gau1991 10 years ago
parent
commit
bb1ba0bb76
  1. 4
      ee/cli/plugins/stack.py
  2. 9
      ee/core/variables.py

4
ee/cli/plugins/stack.py

@ -477,7 +477,7 @@ class EEStackController(CementBaseController):
config['PHP']['post_max_size'] = '100M'
config['PHP']['upload_max_filesize'] = '100M'
config['PHP']['max_execution_time'] = '300'
config['PHP']['date.timezone'] = time.tzname[time.daylight]
config['PHP']['date.timezone'] = EEVariables.ee_timezone
with open('/etc/php5/fpm/php.ini',
encoding='utf-8', mode='w') as configfile:
Log.debug(self, "Writting php configuration into "
@ -590,7 +590,7 @@ class EEStackController(CementBaseController):
if set(EEVariables.ee_hhvm).issubset(set(apt_packages)):
EEShellExec.cmd_exec(self, "update-rc.d hhvm defaults")
EEFileUtils.searchreplace(self, "/etc/hhvm/server.ini",
"9000", "8000")
EEFileUtils.searchreplace(self, "/etc/nginx/hhvm.conf",

9
ee/core/variables.py

@ -28,6 +28,15 @@ class EEVariables():
ee_platform_version = platform.linux_distribution()[1]
ee_platform_codename = os.popen("lsb_release -sc | tr -d \'\\n\'").read()
# Get timezone of system
if os.path.isfile('/etc/timezone'):
with open("/etc/timezone", "r") as tzfile:
ee_timezone = tzfile.read().replace('\n', '')
if ee_timezone == "Etc/UTC":
ee_timezone = "UTC"
else:
ee_timezone = "UTC"
# Get FQDN of system
ee_fqdn = socket.getfqdn()

Loading…
Cancel
Save