derick Sun May 3 19:57:35 2009 UTC
Modified files:
/php-src/ext/date php_date.c php_date.h
Log:
- Added timezone_version_get() to retrieve the version of the used timezone
database.
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.226&r2=1.227&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.226 php-src/ext/date/php_date.c:1.227
--- php-src/ext/date/php_date.c:1.226 Sun May 3 18:45:05 2009
+++ php-src/ext/date/php_date.c Sun May 3 19:57:35 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.226 2009/05/03 18:45:05 derick Exp $ */
+/* $Id: php_date.c,v 1.227 2009/05/03 19:57:35 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -329,6 +329,9 @@
ZEND_BEGIN_ARG_INFO(arginfo_timezone_abbreviations_list, 0)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_timezone_version_get, 0)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_interval_create_from_date_string, 0, 0, 1)
ZEND_ARG_INFO(0, time)
ZEND_END_ARG_INFO()
@@ -405,6 +408,7 @@
PHP_FE(timezone_location_get, arginfo_timezone_location_get)
PHP_FE(timezone_identifiers_list, arginfo_timezone_identifiers_list)
PHP_FE(timezone_abbreviations_list, arginfo_timezone_abbreviations_list)
+ PHP_FE(timezone_version_get, arginfo_timezone_version_get)
PHP_FE(date_interval_create_from_date_string,
arginfo_date_interval_create_from_date_string)
PHP_FE(date_interval_format, arginfo_date_interval_format)
@@ -3893,6 +3897,18 @@
}
/* }}} */
+/* {{{ proto array timezone_version_get()
+ Returns the Olson database version number.
+*/
+PHP_FUNCTION(timezone_version_get)
+{
+ const timelib_tzdb *tzdb;
+
+ tzdb = DATE_TIMEZONEDB;
+ RETURN_ASCII_STRING(tzdb->version, 1);
+}
+/* }}} */
+
/* {{{ proto array timezone_abbreviations_list() U
Returns associative array containing dst, offset and the timezone name
*/
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.h?r1=1.44&r2=1.45&diff_format=u
Index: php-src/ext/date/php_date.h
diff -u php-src/ext/date/php_date.h:1.44 php-src/ext/date/php_date.h:1.45
--- php-src/ext/date/php_date.h:1.44 Tue Mar 10 23:39:11 2009
+++ php-src/ext/date/php_date.h Sun May 3 19:57:35 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.h,v 1.44 2009/03/10 23:39:11 helly Exp $ */
+/* $Id: php_date.h,v 1.45 2009/05/03 19:57:35 derick Exp $ */
#ifndef PHP_DATE_H
#define PHP_DATE_H
@@ -80,6 +80,7 @@
PHP_FUNCTION(timezone_location_get);
PHP_FUNCTION(timezone_identifiers_list);
PHP_FUNCTION(timezone_abbreviations_list);
+PHP_FUNCTION(timezone_version_get);
PHP_METHOD(timezone, identifiers_list);
PHP_METHOD(timezone, abbreviations_list);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php