diff options
| author | Derick Rethans <derick@php.net> | 2005-10-03 11:34:51 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2005-10-03 11:34:51 +0000 |
| commit | e117d540d1f876aaef127ff9351e82c15abcaff1 (patch) | |
| tree | 16ae0b935679cd8e90ceb79459b2db741b3fdecd | |
| parent | afccca77dd82027aa840e9504066cf3c52616261 (diff) | |
| download | php-git-e117d540d1f876aaef127ff9351e82c15abcaff1.tar.gz | |
- MFH: Only use external database when it is newer than the builtin one.
| -rw-r--r-- | ext/date/php_date.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index e694fc6dbd..b3d621a756 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -551,8 +551,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; + } } /* }}} */ |
