]> git.pld-linux.org Git - packages/php.git/commitdiff
use "System/Localtime" tzname (which uses /etc/localtime) if configuration can not...
authorElan Ruusamäe <glen@delfi.ee>
Fri, 10 Aug 2012 06:39:29 +0000 (09:39 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 10 Aug 2012 06:39:29 +0000 (09:39 +0300)
php.spec

index 4b93a843d6a9cf5d71d5fdb8547a4ed18c3e5a87..e1d243d89bfd5984520dc79f25eb2ccb45925f1a 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2533,12 +2533,15 @@ fi
 
 %post common
 # PHP 5.3 requires timezone being setup, try setup it from tzdata
-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
+if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini; then
+       if [ -f /etc/sysconfig/timezone ]; then
+               TIMEZONE=
+               . /etc/sysconfig/timezone
+       else
+               TIMEZONE=System/Localtime
        fi
+
+       %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
 fi
 
 %posttrans common
This page took 0.040967 seconds and 4 git commands to generate.