aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Floris Bos <bos@je-eigen-domein.nl>2015-05-02 17:10:15 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-05-02 19:18:11 +0200
commit5f37843ab78d2faa5a1cf48f7dd97df29d1fcd80 (patch)
treecb1251822d23ae91f5a89cf5a4dd3a2a531c7027
parent38c9ac40f9fc0e49c02bc56faee493d5dedb7332 (diff)
downloadbuildroot-5f37843ab78d2faa5a1cf48f7dd97df29d1fcd80.tar.gz
buildroot-5f37843ab78d2faa5a1cf48f7dd97df29d1fcd80.tar.bz2
php.ini: set date.timezone
Set date.timezone in php.ini to match time zone settings. Prevents a warning being logged about it not being set each time a PHP date/time method is used. Signed-off-by: Floris Bos <bos@je-eigen-domein.nl> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/php/php.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/php/php.mk b/package/php/php.mk
index 3b9a1176b8..47811fff76 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -24,6 +24,12 @@ PHP_CONF_ENV = \
ac_cv_func_strcasestr=yes \
EXTRA_LIBS="$(PHP_EXTRA_LIBS)"
+ifeq ($(BR2_TARGET_LOCALTIME),)
+PHP_LOCALTIME = UTC
+else
+PHP_LOCALTIME = $(BR2_TARGET_LOCALTIME)
+endif
+
# PHP can't be AUTORECONFed the standard way unfortunately
PHP_DEPENDENCIES += host-autoconf host-automake host-libtool
define PHP_BUILDCONF
@@ -288,6 +294,8 @@ define PHP_INSTALL_FIXUP
rm -f $(TARGET_DIR)/usr/bin/phpize
$(INSTALL) -D -m 0755 $(PHP_DIR)/php.ini-production \
$(TARGET_DIR)/etc/php.ini
+ $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \
+ $(TARGET_DIR)/etc/php.ini
endef
PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP