From: Derick Rethans Date: Mon, 3 Oct 2005 11:34:27 +0000 (+0000) Subject: - Only load external database when it is newer. X-Git-Tag: RELEASE_0_9_0~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f027a065a759fb0fbe8c27ef48fab8dd93953ca5;p=php - Only load external database when it is newer. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 856b2025cc..44fccb6750 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -665,8 +665,12 @@ PHP_FUNCTION(gmdate) /* {{{ 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; + } } /* }}} */