--- embedaddon/php/ext/date/php_date.h 2012/02/21 23:47:53 1.1 +++ embedaddon/php/ext/date/php_date.h 2014/06/15 20:03:41 1.1.1.5 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.h,v 1.1 2012/02/21 23:47:53 misho Exp $ */ +/* $Id: php_date.h,v 1.1.1.5 2014/06/15 20:03:41 misho Exp $ */ #ifndef PHP_DATE_H #define PHP_DATE_H @@ -88,6 +88,8 @@ PHP_FUNCTION(date_interval_format); PHP_FUNCTION(date_interval_create_from_date_string); PHP_METHOD(DatePeriod, __construct); +PHP_METHOD(DatePeriod, __wakeup); +PHP_METHOD(DatePeriod, __set_state); /* Options and Configuration */ PHP_FUNCTION(date_default_timezone_set); @@ -120,14 +122,9 @@ struct _php_timezone_obj { int initialized; int type; union { - timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */ - timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET */ - struct /* TIMELIB_ZONETYPE_ABBR */ - { - timelib_sll utc_offset; - char *abbr; - int dst; - } z; + timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID */ + timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET */ + timelib_abbr_info z; /* TIMELIB_ZONETYPE_ABBR */ } tzi; }; @@ -150,10 +147,11 @@ struct _php_period_obj { }; ZEND_BEGIN_MODULE_GLOBALS(date) - char *default_timezone; - char *timezone; - HashTable *tzcache; + char *default_timezone; + char *timezone; + HashTable *tzcache; timelib_error_container *last_errors; + int timezone_valid; ZEND_END_MODULE_GLOBALS(date) #ifdef ZTS @@ -162,10 +160,10 @@ ZEND_END_MODULE_GLOBALS(date) #define DATEG(v) (date_globals.v) #endif -/* Backwards compability wrapper */ +/* Backwards compatibility wrapper */ PHPAPI signed long php_parse_date(char *string, signed long *now); PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt); -PHPAPI int php_idate(char format, time_t ts, int localtime); +PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC); #if HAVE_STRFTIME #define _php_strftime php_strftime PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);