derick Mon Oct 3 07:34:51 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/date php_date.c Log: - MFH: Only use external database when it is newer than the builtin one. http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.43.2.7&r2=1.43.2.8&ty=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.7 php-src/ext/date/php_date.c:1.43.2.8 --- php-src/ext/date/php_date.c:1.43.2.7 Mon Oct 3 07:17:22 2005 +++ php-src/ext/date/php_date.c Mon Oct 3 07:34:51 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.7 2005/10/03 11:17:22 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.8 2005/10/03 11:34:51 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -551,8 +551,12 @@ /* {{{ php_date_set_tzdb - NOT THREADSAFE */ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb) { - php_date_global_timezone_db = tzdb; - php_date_global_timezone_db_enabled = 1; + timelib_tzdb *builtin = timelib_builtin_db(); + + if (php_version_compare(tzdb->version, builtin->version) > 0) { + php_date_global_timezone_db = tzdb; + php_date_global_timezone_db_enabled = 1; + } } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php