Browse Source

Fixes PHP timezone issue

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

2
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 "

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