From f027a065a759fb0fbe8c27ef48fab8dd93953ca5 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 3 Oct 2005 11:34:27 +0000 Subject: [PATCH] - Only load external database when it is newer. --- ext/date/php_date.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; + } } /* }}} */ -- 2.50.1