mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Timezone handling (#70)
* supply TZ info in php template * should be already set in default_vars * elgg - softcode timezone * use supplied variable in php template * guard against TZ not being present in env
This commit is contained in:
parent
c00a5d828b
commit
e5543b3f99
6 changed files with 6 additions and 10 deletions
|
@ -53,6 +53,10 @@
|
|||
value: '{{ ansible_product_uuid }}'
|
||||
|
||||
# Put all computed vars here so derive properly from any prior var file
|
||||
- name: If the TZ is not set in env, set it to UTC
|
||||
set_fact: local_tz='UTC'
|
||||
when: local_tz == ""
|
||||
|
||||
- name: Set port 80 for Admin Console
|
||||
set_fact:
|
||||
gui_port: 80
|
||||
|
|
|
@ -8,7 +8,6 @@ elgg_install: True
|
|||
elgg_enabled: False
|
||||
|
||||
# following variables used in elgg engine/settings.php template
|
||||
timezone: America/New_York
|
||||
dbuser: Admin
|
||||
dbpassword: changeme
|
||||
dbname: elggdb
|
||||
|
|
|
@ -53,10 +53,6 @@
|
|||
- localhost
|
||||
when: mysql_enabled and elgg_enabled
|
||||
|
||||
- name: If the TZ is not set in env, set it to UTC
|
||||
set_fact: local_tz='UTC'
|
||||
when: local_tz == ""
|
||||
|
||||
# The name of this file changed from 1.9 to 1.10.
|
||||
- name: Copy default .htaccess to the root directory of elgg tree
|
||||
copy: src="/opt/{{ elgg_xx }}/install/config/htaccess.dist"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
date_default_timezone_set({{ timezone }});
|
||||
date_default_timezone_set({{ local_tz }});
|
||||
/**
|
||||
* Defines database credentials.
|
||||
*
|
||||
|
|
|
@ -633,7 +633,7 @@ default_socket_timeout = 60
|
|||
|
||||
[Date]
|
||||
; Defines the default timezone used by the date functions
|
||||
;date.timezone =
|
||||
date.timezone = {{ local_tz }}
|
||||
|
||||
;date.default_latitude = 31.7667
|
||||
;date.default_longitude = 35.2333
|
||||
|
|
|
@ -90,9 +90,6 @@
|
|||
mysql_db: db=test state=absent
|
||||
when: mysql_enabled
|
||||
|
||||
- name: Set the php default date, so it does not complain
|
||||
lineinfile: line="date.timezone = {{ local_tz }}" dest=/etc/php.ini
|
||||
|
||||
# we had to start mysql in order to configure it, now turn if off if not enabled
|
||||
- name: Provisioally Disable the MySQL service
|
||||
service: name={{ mysql_service }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue