- Timezone DB 2005.13.

git-svn-id: http://svn.php.net/repository/pecl/timezonedb/trunk@197440 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans
2005-10-03 11:24:16 +00:00
parent 16c3dea9e5
commit aa904b9b55
6 changed files with 16649 additions and 0 deletions

2
CREDITS Normal file
View File

@@ -0,0 +1,2 @@
timezonedb
Derick Rethans

11
config.m4 Normal file
View File

@@ -0,0 +1,11 @@
dnl $Id$
dnl config.m4 for input timezonedbing extension
PHP_ARG_ENABLE(timezonedb, whether to enable timezonedb support,
[ --enable-timezonedb Enable timezonedb support])
if test "$PHP_timezonedb" != "no"; then
PHP_SUBST(TIMEZONEDB_SHARED_LIBADD)
PHP_NEW_EXTENSION(timezonedb, timezonedb.c, $ext_shared)
CPPFLAGS="$CPPFLAGS -Wall"
fi

40
package.xml Normal file
View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>timezonedb</name>
<summary>Timezone Database to be used with PHP's date and time functions</summary>
<maintainers>
<maintainer>
<user>derick</user>
<name>Derick Rethans</name>
<email>derick@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
This extension is a drop-in replacement for the builtin timezone database that
comes with PHP. You should only install this extension in case you need to get
a later version of the timezone database then the one that ships with PHP.
</description>
<license>PHP</license>
<release>
<state>stable</state>
<version>2005.13</version>
<date>2005-10-03</date>
<notes>
1) Fixed library detection routines.
</notes>
<filelist>
<file role="src" name="config.m4"/>
<file role="src" name="timezonedb.c"/>
<file role="src" name="timezonedb.h"/>
<file role="src" name="php_timezonedb.h"/>
<file role="doc" name="CREDITS"/>
</filelist>
<deps>
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->

40
php_timezonedb.h Normal file
View File

@@ -0,0 +1,40 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Derick Rethans <derick@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_TIMEZONEDB_H
#define PHP_TIMEZONEDB_H
#include "php.h"
extern zend_module_entry timezonedb_module_entry;
#define phpext_timezonedb_ptr &timezonedb_module_entry
PHP_MINIT_FUNCTION(timezonedb);
PHP_MINFO_FUNCTION(timezonedb);
#endif /* TIMEZONEDB_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/

99
timezonedb.c Normal file
View File

@@ -0,0 +1,99 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Derick Rethans <derick@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "ext/standard/info.h"
#include "php_timezonedb.h"
#include "ext/date/php_date.h"
#define timezonedb_builtin timezonedb_external
#include "timezonedb.h"
/* {{{ timezonedb_functions[]
*/
function_entry timezonedb_functions[] = {
{NULL, NULL, NULL}
};
/* }}} */
/* {{{ timezonedb_module_entry
*/
zend_module_entry timezonedb_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"timezonedb",
timezonedb_functions,
PHP_MINIT(timezonedb),
NULL,
NULL,
NULL,
PHP_MINFO(timezonedb),
"0.1",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
#ifdef COMPILE_DL_TIMEZONEDB
ZEND_GET_MODULE(timezonedb)
#endif
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(timezonedb)
{
php_date_set_tzdb(&timezonedb_external);
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION(timezonedb)
{
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(timezonedb)
{
php_info_print_table_start();
php_info_print_table_row( 2, "Alternative Timezone Database", "enabled" );
php_info_print_table_row( 2, "Revision", "$Revision$");
php_info_print_table_end();
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/

16457
timezonedb.h Normal file

File diff suppressed because it is too large Load Diff