derick Mon Oct 3 07:34:29 2005 EDT
Modified files:
/php-src/ext/date php_date.c
Log:
- Only load external database when it is newer.
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.55&r2=1.56&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.55 php-src/ext/date/php_date.c:1.56
--- php-src/ext/date/php_date.c:1.55 Mon Oct 3 07:15:15 2005
+++ php-src/ext/date/php_date.c Mon Oct 3 07:34:27 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.55 2005/10/03 11:15:15 derick Exp $ */
+/* $Id: php_date.c,v 1.56 2005/10/03 11:34:27 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -665,8 +665,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