[packages/php/PHP_5_4] Revert "use "System/Localtime" tzname (which uses /etc/localtime) if configuration can not be found"

glen glen at pld-linux.org
Thu Aug 16 19:55:16 CEST 2012


commit 5d43dd0de6cac36d7b4384c73d51677b948251fd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Aug 16 20:55:04 2012 +0300

    Revert "use "System/Localtime" tzname (which uses /etc/localtime) if configuration can not be found"
    
    This reverts commit e84b92a40b7768668729da7f3ffeddb05b8dd7fc.

 php.spec | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/php.spec b/php.spec
index 2f26b2a..18144ca 100644
--- a/php.spec
+++ b/php.spec
@@ -2536,15 +2536,12 @@ fi
 
 %post common
 # PHP 5.3 requires timezone being setup, try setup it from tzdata
-if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini; then
-	if [ -f /etc/sysconfig/timezone ]; then
-		TIMEZONE=
-		. /etc/sysconfig/timezone
-	else
-		TIMEZONE=System/Localtime
+if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/sysconfig/timezone ]; then
+	TIMEZONE=
+	. /etc/sysconfig/timezone
+	if [ "$TIMEZONE" ]; then
+		%{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
 	fi
-
-	%{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
 fi
 
 %posttrans common


More information about the pld-cvs-commit mailing list