%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