Commit 5f37843a authored by Floris Bos's avatar Floris Bos Committed by Thomas Petazzoni
Browse files

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: default avatarFloris Bos <bos@je-eigen-domein.nl>
Reviewed-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 38c9ac40
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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