[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-05-01 Thread Derick Rethans
derick  Thu May  1 13:31:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Include the starting date by default in the iterator output, but add an
option to disable this behavior.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.31&r2=1.43.2.45.2.51.2.32&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.31 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.32
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.31 Thu May  1 00:12:24 2008
+++ php-src/ext/date/php_date.c Thu May  1 13:31:22 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.31 2008/05/01 00:12:24 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.32 2008/05/01 13:31:22 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -331,6 +331,7 @@
timelib_rel_time *interval;
int   recurrences;
int   initialized;
+   int   include_start_date;
 };
 
 #define DATE_SET_CONTEXT \
@@ -1570,6 +1571,8 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+#define PHP_DATE_PERIOD_EXCLUDE_START_DATE 0x0001
+
 
 /* define an overloaded iterator structure */
 typedef struct {
@@ -1624,18 +1627,20 @@
timelib_time *it_time = object->start;
php_date_obj *newdateobj;
 
-   /* apply modification */
-   it_time->relative.y = object->interval->y;
-   it_time->relative.m = object->interval->m;
-   it_time->relative.d = object->interval->d;
-   it_time->relative.h = object->interval->h;
-   it_time->relative.i = object->interval->i;
-   it_time->relative.s = object->interval->s;
-   it_time->relative.weekday = object->interval->weekday;
-   it_time->have_relative = 1;
-   it_time->sse_uptodate = 0;
-   timelib_update_ts(it_time, NULL);
-   timelib_update_from_sse(it_time);
+   /* apply modification if it's not the first iteration */
+   if (!object->include_start_date || iterator->current_index > 0) {
+   it_time->relative.y = object->interval->y;
+   it_time->relative.m = object->interval->m;
+   it_time->relative.d = object->interval->d;
+   it_time->relative.h = object->interval->h;
+   it_time->relative.i = object->interval->i;
+   it_time->relative.s = object->interval->s;
+   it_time->relative.weekday = object->interval->weekday;
+   it_time->have_relative = 1;
+   it_time->sse_uptodate = 0;
+   timelib_update_ts(it_time, NULL);
+   timelib_update_from_sse(it_time);
+   }
 
/* Create new object */
MAKE_STD_ZVAL(iterator->current);
@@ -1789,6 +1794,11 @@
zend_class_implements(date_ce_period TSRMLS_CC, 1, zend_ce_traversable);
memcpy(&date_object_handlers_period, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_period.clone_obj = date_object_clone_period;
+
+#define REGISTER_PERIOD_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_period, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_PERIOD_CLASS_CONST_STRING("EXCLUDE_START_DATE", 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -3346,11 +3356,11 @@
php_date_obj *dateobj;
php_interval_obj *intobj;
zval *start, *interval;
-   long  recurrences;
+   long  recurrences, options = 0;
timelib_time *clone;

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOl", &start, 
date_ce_date, &interval, date_ce_interval, &recurrences) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, 
date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) {
RETURN_FALSE;
}
 
@@ -3369,8 +3379,9 @@
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj->interval = timelib_rel_time_clone(intobj->diff);
dpobj->start= clone;
-   dpobj->recurrences = recurrences;
dpobj->initialized = 1;
+   dpobj->include_start_date = !(options & 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
+   dpobj->recurrences = recurrences + dpobj->include_start_date;
 
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-05-01 Thread Derick Rethans
derick  Thu May  1 13:31:01 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Include the starting date by default in the iterator output, but add an
option to disable this behavior.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.179&r2=1.180&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.179 php-src/ext/date/php_date.c:1.180
--- php-src/ext/date/php_date.c:1.179   Thu May  1 00:10:25 2008
+++ php-src/ext/date/php_date.c Thu May  1 13:31:00 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.179 2008/05/01 00:10:25 derick Exp $ */
+/* $Id: php_date.c,v 1.180 2008/05/01 13:31:00 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -333,6 +333,7 @@
timelib_rel_time *interval;
int   recurrences;
int   initialized;
+   int   include_start_date;
 };
 
 #define DATE_SET_CONTEXT \
@@ -1696,6 +1697,8 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+#define PHP_DATE_PERIOD_EXCLUDE_START_DATE 0x0001
+
 
 /* define an overloaded iterator structure */
 typedef struct {
@@ -1750,18 +1753,20 @@
timelib_time *it_time = object->start;
php_date_obj *newdateobj;
 
-   /* apply modification */
-   it_time->relative.y = object->interval->y;
-   it_time->relative.m = object->interval->m;
-   it_time->relative.d = object->interval->d;
-   it_time->relative.h = object->interval->h;
-   it_time->relative.i = object->interval->i;
-   it_time->relative.s = object->interval->s;
-   it_time->relative.weekday = object->interval->weekday;
-   it_time->have_relative = 1;
-   it_time->sse_uptodate = 0;
-   timelib_update_ts(it_time, NULL);
-   timelib_update_from_sse(it_time);
+   /* apply modification if it's not the first iteration */
+   if (!object->include_start_date || iterator->current_index > 0) {
+   it_time->relative.y = object->interval->y;
+   it_time->relative.m = object->interval->m;
+   it_time->relative.d = object->interval->d;
+   it_time->relative.h = object->interval->h;
+   it_time->relative.i = object->interval->i;
+   it_time->relative.s = object->interval->s;
+   it_time->relative.weekday = object->interval->weekday;
+   it_time->have_relative = 1;
+   it_time->sse_uptodate = 0;
+   timelib_update_ts(it_time, NULL);
+   timelib_update_from_sse(it_time);
+   }
 
/* Create new object */
MAKE_STD_ZVAL(iterator->current);
@@ -1915,6 +1920,11 @@
zend_class_implements(date_ce_period TSRMLS_CC, 1, zend_ce_traversable);
memcpy(&date_object_handlers_period, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_period.clone_obj = date_object_clone_period;
+
+#define REGISTER_PERIOD_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_period, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_PERIOD_CLASS_CONST_STRING("EXCLUDE_START_DATE", 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -3514,11 +3524,11 @@
php_date_obj *dateobj;
php_interval_obj *intobj;
zval *start, *interval;
-   long  recurrences;
+   long  recurrences, options = 0;
timelib_time *clone;

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOl", &start, 
date_ce_date, &interval, date_ce_interval, &recurrences) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, 
date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) {
RETURN_FALSE;
}
 
@@ -3537,8 +3547,9 @@
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj->interval = timelib_rel_time_clone(intobj->diff);
dpobj->start= clone;
-   dpobj->recurrences = recurrences;
dpobj->initialized = 1;
+   dpobj->include_start_date = !(options & 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
+   dpobj->recurrences = recurrences + dpobj->include_start_date;
 
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c php_date.h /ext/date/lib timelib.c timelib.h

2008-04-30 Thread Derick Rethans
derick  Thu May  1 00:12:25 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/date   php_date.c php_date.h 
/php-src/ext/date/lib   timelib.c timelib.h 
  Log:
  - MFH: Added the DatePeriod class/iterator that iterates over a date time
object for a specific number of iterators and applies a DateInterval each
time.
  @DOC: More will follow though
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.166&r2=1.2027.2.547.2.965.2.167&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.166 
php-src/NEWS:1.2027.2.547.2.965.2.167
--- php-src/NEWS:1.2027.2.547.2.965.2.166   Tue Apr 29 08:15:16 2008
+++ php-src/NEWSThu May  1 00:12:24 2008
@@ -57,6 +57,8 @@
   . proper support for "this week", "previous week"/"last week" and "next week"
 phrases so that they actually mean the week and not a seven day period
 around the current day.
+  . added the DatePeriod class, that supports iterating over a DateTime object
+applying a DateInterval on each iteration.
 
 - Added functionality to SPL extension:
   . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.30&r2=1.43.2.45.2.51.2.31&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.30 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.31
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.30 Fri Apr 25 12:35:40 2008
+++ php-src/ext/date/php_date.c Thu May  1 00:12:24 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.30 2008/04/25 12:35:40 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.31 2008/05/01 00:12:24 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -27,6 +27,7 @@
 #include "ext/standard/php_versioning.h"
 #include "ext/standard/php_math.h"
 #include "php_date.h"
+#include "zend_interfaces.h"
 #include "lib/timelib.h"
 #include 
 
@@ -246,8 +247,14 @@
{NULL, NULL, NULL}
 };
 
+const zend_function_entry date_funcs_period[] = {
+   PHP_ME(DatePeriod,__construct, NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+   {NULL, NULL, NULL}
+};
+
 static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 static void date_register_classes(TSRMLS_D);
+static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
 /* }}} */
 
 ZEND_DECLARE_MODULE_GLOBALS(date)
@@ -276,15 +283,17 @@
 PHP_INI_END()
 /* }}} */
 
-zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval;
+zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval, 
*date_ce_period;
 
 static zend_object_handlers date_object_handlers_date;
 static zend_object_handlers date_object_handlers_timezone;
 static zend_object_handlers date_object_handlers_interval;
+static zend_object_handlers date_object_handlers_period;
 
 typedef struct _php_date_obj php_date_obj;
 typedef struct _php_timezone_obj php_timezone_obj;
 typedef struct _php_interval_obj php_interval_obj;
+typedef struct _php_period_obj php_period_obj;
 
 struct _php_date_obj {
zend_object   std;
@@ -315,6 +324,15 @@
int   initialized;
 };
 
+struct _php_period_obj {
+   zend_object   std;
+   timelib_time *start;
+   timelib_time *end;
+   timelib_rel_time *interval;
+   int   recurrences;
+   int   initialized;
+};
+
 #define DATE_SET_CONTEXT \
zval *object; \
object = getThis(); \
@@ -342,14 +360,17 @@
 static void date_object_free_storage_date(void *object TSRMLS_DC);
 static void date_object_free_storage_timezone(void *object TSRMLS_DC);
 static void date_object_free_storage_interval(void *object TSRMLS_DC);
+static void date_object_free_storage_period(void *object TSRMLS_DC);
 
 static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_interval(zend_class_entry *class_type 
TSRMLS_DC);
+static zend_object_value date_object_new_period(zend_class_entry *class_type 
TSRMLS_DC);
 
 static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 static zend_object_value date_object_clone_interval(zval *this_ptr TSRMLS_DC);
+static zend_object_value date_object_clone_period(zval *this_ptr TSRMLS_DC);
 
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
 static HashTable *date_object_get_properties(zval *object TSRMLS_DC);
@@ -1549,9 +1570,161 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+
+/* define an overloaded iterator structure */
+typedef str

[PHP-CVS] cvs: php-src /ext/date php_date.c php_date.h /ext/date/lib timelib.c timelib.h

2008-04-30 Thread Derick Rethans
derick  Thu May  1 00:10:25 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c php_date.h 
/php-src/ext/date/lib   timelib.c timelib.h 
  Log:
  - Added the DatePeriod class/iterator that iterates over a date time object
for a specific number of iterators and applies a DateInterval each time.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.178&r2=1.179&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.178 php-src/ext/date/php_date.c:1.179
--- php-src/ext/date/php_date.c:1.178   Fri Apr 25 12:55:16 2008
+++ php-src/ext/date/php_date.c Thu May  1 00:10:25 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.178 2008/04/25 12:55:16 derick Exp $ */
+/* $Id: php_date.c,v 1.179 2008/05/01 00:10:25 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -27,6 +27,7 @@
 #include "ext/standard/php_versioning.h"
 #include "ext/standard/php_math.h"
 #include "php_date.h"
+#include "zend_interfaces.h"
 #include "lib/timelib.h"
 #include 
 #include 
@@ -248,8 +249,14 @@
{NULL, NULL, NULL}
 };
 
+const zend_function_entry date_funcs_period[] = {
+   PHP_ME(DatePeriod,__construct, NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+   {NULL, NULL, NULL}
+};
+
 static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 static void date_register_classes(TSRMLS_D);
+static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
 /* }}} */
 
 ZEND_DECLARE_MODULE_GLOBALS(date)
@@ -278,15 +285,17 @@
 PHP_INI_END()
 /* }}} */
 
-zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval;
+zend_class_entry *date_ce_date, *date_ce_timezone, *date_ce_interval, 
*date_ce_period;
 
 static zend_object_handlers date_object_handlers_date;
 static zend_object_handlers date_object_handlers_timezone;
 static zend_object_handlers date_object_handlers_interval;
+static zend_object_handlers date_object_handlers_period;
 
 typedef struct _php_date_obj php_date_obj;
 typedef struct _php_timezone_obj php_timezone_obj;
 typedef struct _php_interval_obj php_interval_obj;
+typedef struct _php_period_obj php_period_obj;
 
 struct _php_date_obj {
zend_object   std;
@@ -317,6 +326,15 @@
int   initialized;
 };
 
+struct _php_period_obj {
+   zend_object   std;
+   timelib_time *start;
+   timelib_time *end;
+   timelib_rel_time *interval;
+   int   recurrences;
+   int   initialized;
+};
+
 #define DATE_SET_CONTEXT \
zval *object; \
object = getThis(); \
@@ -344,14 +362,17 @@
 static void date_object_free_storage_date(void *object TSRMLS_DC);
 static void date_object_free_storage_timezone(void *object TSRMLS_DC);
 static void date_object_free_storage_interval(void *object TSRMLS_DC);
+static void date_object_free_storage_period(void *object TSRMLS_DC);
 
 static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_interval(zend_class_entry *class_type 
TSRMLS_DC);
+static zend_object_value date_object_new_period(zend_class_entry *class_type 
TSRMLS_DC);
 
 static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 static zend_object_value date_object_clone_interval(zval *this_ptr TSRMLS_DC);
+static zend_object_value date_object_clone_period(zval *this_ptr TSRMLS_DC);
 
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
 static HashTable *date_object_get_properties(zval *object TSRMLS_DC);
@@ -1675,9 +1696,161 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+
+/* define an overloaded iterator structure */
+typedef struct {
+   zend_object_iterator  intern;
+   zval *current;
+   php_period_obj   *object;
+   int   current_index;
+} date_period_it;
+
+/* {{{ date_period_it_invalidate_current */
+static void date_period_it_invalidate_current(zend_object_iterator *iter 
TSRMLS_DC)
+{
+   date_period_it *iterator = (date_period_it *)iter;
+
+   if (iterator->current) {
+   zval_ptr_dtor(&iterator->current);
+   iterator->current = NULL;
+   }
+}
+/* }}} */
+
+
+/* {{{ date_period_it_dtor */
+static void date_period_it_dtor(zend_object_iterator *iter TSRMLS_DC)
+{
+   date_period_it *iterator = (date_period_it *)iter;
+   zval*intern = (zval*)iterator->intern.data;
+
+   date_period_it_invalidate_current(iter TSRMLS_CC);
+
+   efree(iterator);
+}
+/* }}} */
+
+
+/* {{{ date_period_it_has_more */
+static int date_period_it_has_more(zend_object_iterator *iter TSR

[PHP-CVS] cvs: CVSROOT / avail

2008-04-25 Thread Derick Rethans
derick  Fri Apr 25 13:30:25 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give Graham (the GSoC student) access to pecl/optimizer.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1387&r2=1.1388&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1387 CVSROOT/avail:1.1388
--- CVSROOT/avail:1.1387Thu Apr 24 11:33:48 2008
+++ CVSROOT/avail   Fri Apr 25 13:30:25 2008
@@ -291,6 +291,7 @@
 avail|thierry|pecl/fam
 avail|hamano|pecl/tcc
 avail|tetsuya|pear/Services_Yahoo_JP
+avail|graham|pecl/optimizer
 
 # Objective-C bridge
 avail|wez,jan|php-objc



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date config.m4 php_date.c php_date.h /ext/date/lib README interval.c parse_date.c parse_iso_intervals.c parse_iso_intervals.re timelib.c timelib.h timelib

2008-04-25 Thread Derick Rethans
derick  Fri Apr 25 12:36:11 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/lib   interval.c parse_iso_intervals.c 
parse_iso_intervals.re 
/php-src/ext/date/tests bug44742.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   config.m4 php_date.c php_date.h 
/php-src/ext/date/lib   README parse_date.c timelib.c timelib.h 
timelib_structs.h tm2unixtime.c 
  Log:
  - Added new date/time functionality:
. support for diffing date/times through date_diff() / DateTime::diff().
. added DateInterval class to represent the difference between two 
date/times.
. support for parsing ISO intervals for use with DateInterval.
. date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an
  interval to an existing date/time.
  - MFH: Fixed bug #44742 (timezone_offset_get() causes segmentation faults).
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.162&r2=1.2027.2.547.2.965.2.163&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.162 
php-src/NEWS:1.2027.2.547.2.965.2.163
--- php-src/NEWS:1.2027.2.547.2.965.2.162   Thu Apr 24 07:45:01 2008
+++ php-src/NEWSFri Apr 25 12:35:40 2008
@@ -49,6 +49,11 @@
   . support for "first/last day of " style texts.
   . support for date/time strings returned by MS SQL.
   . support for serialization and unserialization of DateTime objects.
+  . support for diffing date/times through date_diff() / DateTime::diff().
+  . added DateInterval class to represent the difference between two 
date/times.
+  . support for parsing ISO intervals for use with DateInterval.
+  . date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an
+interval to an existing date/time.
 - Added functionality to SPL extension:
   . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
   . Added ability to store associative information with objects in
@@ -149,6 +154,7 @@
 - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
 
 - Fixed bug #44805 (rename() function is not portable to Windows). (Pierre)
+- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
 - Fixed bug #44648 (Attribute names not checked for wellformedness). (Rob)
 - Fixed bug #44414 (Incomplete reporting about abstract methods). (Dmitry)
 - Fixed bug #44390 (mysqli_bind_param/bind_result and Object member variables)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/config.m4?r1=1.10.2.2&r2=1.10.2.2.4.1&diff_format=u
Index: php-src/ext/date/config.m4
diff -u php-src/ext/date/config.m4:1.10.2.2 
php-src/ext/date/config.m4:1.10.2.2.4.1
--- php-src/ext/date/config.m4:1.10.2.2 Mon Dec 19 13:00:32 2005
+++ php-src/ext/date/config.m4  Fri Apr 25 12:35:40 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.10.2.2 2005/12/19 13:00:32 derick Exp $
+dnl $Id: config.m4,v 1.10.2.2.4.1 2008/04/25 12:35:40 derick Exp $
 dnl config.m4 for date extension
 
 sinclude(ext/date/lib/timelib.m4)
@@ -6,7 +6,7 @@
 
 PHP_DATE_CFLAGS="[EMAIL PROTECTED]@/lib"
 timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 
- lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c"
+ lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c 
lib/parse_iso_intervals.c lib/interval.c"
 
 PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.29&r2=1.43.2.45.2.51.2.30&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.29 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.30
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.29 Mon Mar 31 09:11:30 2008
+++ php-src/ext/date/php_date.c Fri Apr 25 12:35:40 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.29 2008/03/31 09:11:30 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.30 2008/04/25 12:35:40 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -174,9 +174,12 @@
PHP_FE(date_get_last_errors, NULL)
PHP_FE(date_format, NULL)
PHP_FE(date_modify, NULL)
+   PHP_FE(date_add, NULL)
+   PHP_FE(date_sub, NULL)
PHP_FE(date_timezone_get, NULL)
PHP_FE(date_timezone_set, NULL)
PHP_FE(date_offset_get, NULL)
+   PHP_FE(date_diff, NULL)
 
PHP_FE(date_time_set, NULL)
PHP_FE(date_date_set, NULL)
@@ -192,6 +195,8 @@
PHP_FE(timezone_identifiers_list, NULL)
PHP_FE(timezone_abbreviations_list, NULL)
 
+   PHP_FE(date_interval_format, NULL)
+
/* Options and Configuration */
PHP_FE(date_default_timezone_set, arginfo_date_default_timezone_set)
PHP_FE(date_default_timezone_get, arginfo_date_default_timezone_get)
@@ -211,6 +216,8

[PHP-CVS] cvs: CVSROOT / avail

2008-04-22 Thread Derick Rethans
derick  Tue Apr 22 18:47:18 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Copied pecl/litespeed to php-src/litespeed and gave karma to
php-src/sapi/litespeed. cvs rm is required on pecl/litespeed.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1381&r2=1.1382&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1381 CVSROOT/avail:1.1382
--- CVSROOT/avail:1.1381Tue Apr 22 17:08:53 2008
+++ CVSROOT/avail   Tue Apr 22 18:47:18 2008
@@ -254,7 +254,7 @@
 avail|traufeisen,jandrade|pecl/gnupg,phpdoc/en/reference/gnupg
 avail|mikl|pecl/memcache,pecl/wbxml,pecl/ocal,pecl/pam
 avail|ohill|pecl/stem
-avail|gwang|pecl/litespeed
+avail|gwang|pecl/litespeed,php-src/sapi/litespeed
 avail|jsjohnst|pecl/flitetts
 avail|mlwmohawk|pecl/msession,pecl/xmldbx
 avail|nabeel|pecl/axis2



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2008-04-22 Thread Derick Rethans
derick  Tue Apr 22 12:03:10 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give Anthony Phillips source access so he can add tests.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1379&r2=1.1380&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1379 CVSROOT/avail:1.1380
--- CVSROOT/avail:1.1379Wed Apr 16 09:17:38 2008
+++ CVSROOT/avail   Tue Apr 22 12:03:09 2008
@@ -17,7 +17,7 @@
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.
 
-avail|lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,go!
 
palv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd
+avail|lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,go!
 
palv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd
 
 # Some people have access to tests in the Engine
 avail|magnus,michael,zoe,jmessa|Zend/tests,ZendEngine2/tests



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests bug44742.phpt

2008-04-16 Thread Derick Rethans
derick  Wed Apr 16 17:24:00 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests bug44742.phpt 
  Log:
  - MF52: Fixed bug #44703 (htmlspecialchars() does not detect bad character set
argument).
  #- WIll merge to 5.3 later, that branch has some more modifications.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.176&r2=1.177&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.176 php-src/ext/date/php_date.c:1.177
--- php-src/ext/date/php_date.c:1.176   Mon Mar 31 09:10:54 2008
+++ php-src/ext/date/php_date.c Wed Apr 16 17:24:00 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.176 2008/03/31 09:10:54 derick Exp $ */
+/* $Id: php_date.c,v 1.177 2008/04/16 17:24:00 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2750,9 +2750,19 @@
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
 
-   offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz);
-   RETVAL_LONG(offset->offset);
-   timelib_time_offset_dtor(offset);
+   switch (tzobj->type) {
+   case TIMELIB_ZONETYPE_ID:
+   offset = timelib_get_time_zone_info(dateobj->time->sse, 
tzobj->tzi.tz);
+   RETVAL_LONG(offset->offset);
+   timelib_time_offset_dtor(offset);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET:
+   RETURN_LONG(tzobj->tzi.utc_offset * -60);
+   break;
+   case TIMELIB_ZONETYPE_ABBR:
+   RETURN_LONG((tzobj->tzi.z.utc_offset - 
(tzobj->tzi.z.dst*60)) * -60);
+   break;
+   }
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug44742.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/bug44742.phpt
diff -u /dev/null php-src/ext/date/tests/bug44742.phpt:1.2
--- /dev/null   Wed Apr 16 17:24:00 2008
+++ php-src/ext/date/tests/bug44742.phptWed Apr 16 17:24:00 2008
@@ -0,0 +1,35 @@
+--TEST--
+Bug #44742 (timezone_offset_get() causes segmentation faults)
+--FILE--
+
+--EXPECT--
+int(0)
+int(7200)
+int(12600)
+int(-18000)
+int(-41400)
+int(7200)
+int(3600)
+int(0)
+int(-14400)
+int(7200)
+int(28800)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date php_date.c /ext/date/tests bug44742.phpt

2008-04-16 Thread Derick Rethans
derick  Wed Apr 16 17:21:46 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests bug44742.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #44703 (htmlspecialchars() does not detect bad character set
argument).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1142&r2=1.2027.2.547.2.1143&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1142 php-src/NEWS:1.2027.2.547.2.1143
--- php-src/NEWS:1.2027.2.547.2.1142Fri Apr 11 19:01:24 2008
+++ php-src/NEWSWed Apr 16 17:21:44 2008
@@ -1,8 +1,9 @@
 PHPNEWS
 |||
 ?? Apr 2008, PHP 5.2.6
-- Fixed bug #44703 (htmlspecialchars() does not detect bad character set 
argument)
-  (Andy Wharmby)
+- Fixed bug #44703 (htmlspecialchars() does not detect bad character set
+  argument). (Andy Wharmby)
+- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
 
 10 Apr 2008, PHP 5.2.6RC5
 - Fixed incorrect heredoc handling when label is used within the block.
@@ -29,6 +30,9 @@
   (Ilia)
 - Fixed bug #44557 (Crash in imap_setacl when supplied integer as username)
   (Thomas Jarosch)
+- Fixed a bug in formatting timestamps when DST is active in the default
+  timezone (Derick)
+
 
 27 Mar 2008, PHP 5.2.6RC3
 - Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia,
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.57&r2=1.43.2.45.2.58&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.57 
php-src/ext/date/php_date.c:1.43.2.45.2.58
--- php-src/ext/date/php_date.c:1.43.2.45.2.57  Mon Mar 31 09:12:15 2008
+++ php-src/ext/date/php_date.c Wed Apr 16 17:21:46 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.57 2008/03/31 09:12:15 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.58 2008/04/16 17:21:46 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2271,9 +2271,19 @@
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
 
-   offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz);
-   RETVAL_LONG(offset->offset);
-   timelib_time_offset_dtor(offset);
+   switch (tzobj->type) {
+   case TIMELIB_ZONETYPE_ID:
+   offset = timelib_get_time_zone_info(dateobj->time->sse, 
tzobj->tzi.tz);
+   RETVAL_LONG(offset->offset);
+   timelib_time_offset_dtor(offset);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET:
+   RETURN_LONG(tzobj->tzi.utc_offset * -60);
+   break;
+   case TIMELIB_ZONETYPE_ABBR:
+   RETURN_LONG((tzobj->tzi.z.utc_offset - 
(tzobj->tzi.z.dst*60)) * -60);
+   break;
+   }
 }
 /* }}} */
 

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug44742.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug44742.phpt
+++ php-src/ext/date/tests/bug44742.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / acinclude.m4

2008-04-07 Thread Derick Rethans
derick  Mon Apr  7 17:55:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcacinclude.m4 
  Log:
  - Reset back to 0.13.4 now that it released.
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.26.2.5&r2=1.332.2.14.2.26.2.6&diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.332.2.14.2.26.2.5 
php-src/acinclude.m4:1.332.2.14.2.26.2.6
--- php-src/acinclude.m4:1.332.2.14.2.26.2.5Mon Mar 31 10:08:57 2008
+++ php-src/acinclude.m4Mon Apr  7 17:55:21 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.5 2008/03/31 10:08:57 derick Exp $
+dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.6 2008/04/07 17:55:21 derick Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2096,7 +2096,7 @@
   if test -n "$RE2C"; then
 AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
   re2c_vernum=`$RE2C --vernum 2>/dev/null`
-  if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1303"; then
+  if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
 php_cv_re2c_version=invalid
   else
 php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2  2>/dev/null` 
(ok)"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_tz.c unixtime2tm.c

2008-04-07 Thread Derick Rethans
derick  Mon Apr  7 17:44:04 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_tz.c unixtime2tm.c 
  Log:
  - MFH: Fixing returned offset.
  - MFH: Algorithm optimization.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.13.2.1&r2=1.20.2.6.2.13.2.2&diff_format=u
Index: php-src/ext/date/lib/parse_tz.c
diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.1 
php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.2
--- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.1   Mon Dec 31 07:17:07 2007
+++ php-src/ext/date/lib/parse_tz.c Mon Apr  7 17:44:03 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_tz.c,v 1.20.2.6.2.13.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: parse_tz.c,v 1.20.2.6.2.13.2.2 2008/04/07 17:44:03 derick Exp $ */
 
 #include "timelib.h"
 
@@ -391,7 +391,7 @@
switch (t->zone_type) {
case TIMELIB_ZONETYPE_ABBR:
case TIMELIB_ZONETYPE_OFFSET:
-   return t->z * 60;
+   return (t->z + t->dst) * -60;

case TIMELIB_ZONETYPE_ID:
gmt_offset = timelib_get_time_zone_info(t->sse, 
t->tz_info);
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/unixtime2tm.c?r1=1.12.2.4.2.3.2.1&r2=1.12.2.4.2.3.2.2&diff_format=u
Index: php-src/ext/date/lib/unixtime2tm.c
diff -u php-src/ext/date/lib/unixtime2tm.c:1.12.2.4.2.3.2.1 
php-src/ext/date/lib/unixtime2tm.c:1.12.2.4.2.3.2.2
--- php-src/ext/date/lib/unixtime2tm.c:1.12.2.4.2.3.2.1 Mon Dec 31 07:17:07 2007
+++ php-src/ext/date/lib/unixtime2tm.c  Mon Apr  7 17:44:03 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: unixtime2tm.c,v 1.12.2.4.2.3.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: unixtime2tm.c,v 1.12.2.4.2.3.2.2 2008/04/07 17:44:03 derick Exp $ */
 
 #include "timelib.h"
 
@@ -76,12 +76,18 @@
*/
 
while (tmp_days <= 0) {
-   cur_year--;
-   DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, 
cur_year););
-   if (timelib_is_leap(cur_year)) {
-   tmp_days += DAYS_PER_LYEAR;
+   if (tmp_days < -1460970) {
+   cur_year -= 4000;
+   DEBUG(printf("tmp_days=%lld, year=%lld\n", 
tmp_days, cur_year););
+   tmp_days += 1460970;
} else {
-   tmp_days += DAYS_PER_YEAR;
+   cur_year--;
+   DEBUG(printf("tmp_days=%lld, year=%lld\n", 
tmp_days, cur_year););
+   if (timelib_is_leap(cur_year)) {
+   tmp_days += DAYS_PER_LYEAR;
+   } else {
+   tmp_days += DAYS_PER_YEAR;
+   }
}
}
remainder += SECS_PER_DAY;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_tz.c unixtime2tm.c

2008-04-07 Thread Derick Rethans
derick  Mon Apr  7 17:43:49 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_tz.c unixtime2tm.c 
  Log:
  - Fixing returned offset.
  - Algorithm optimization.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.35&r2=1.36&diff_format=u
Index: php-src/ext/date/lib/parse_tz.c
diff -u php-src/ext/date/lib/parse_tz.c:1.35 
php-src/ext/date/lib/parse_tz.c:1.36
--- php-src/ext/date/lib/parse_tz.c:1.35Mon Dec 31 07:12:08 2007
+++ php-src/ext/date/lib/parse_tz.c Mon Apr  7 17:43:49 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_tz.c,v 1.35 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: parse_tz.c,v 1.36 2008/04/07 17:43:49 derick Exp $ */
 
 #include "timelib.h"
 
@@ -370,7 +370,7 @@
switch (t->zone_type) {
case TIMELIB_ZONETYPE_ABBR:
case TIMELIB_ZONETYPE_OFFSET:
-   return t->z * 60;
+   return (t->z + t->dst) * -60;

case TIMELIB_ZONETYPE_ID:
gmt_offset = timelib_get_time_zone_info(t->sse, 
t->tz_info);
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/unixtime2tm.c?r1=1.20&r2=1.21&diff_format=u
Index: php-src/ext/date/lib/unixtime2tm.c
diff -u php-src/ext/date/lib/unixtime2tm.c:1.20 
php-src/ext/date/lib/unixtime2tm.c:1.21
--- php-src/ext/date/lib/unixtime2tm.c:1.20 Mon Dec 31 07:12:08 2007
+++ php-src/ext/date/lib/unixtime2tm.c  Mon Apr  7 17:43:49 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: unixtime2tm.c,v 1.20 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: unixtime2tm.c,v 1.21 2008/04/07 17:43:49 derick Exp $ */
 
 #include "timelib.h"
 
@@ -76,12 +76,18 @@
*/
 
while (tmp_days <= 0) {
-   cur_year--;
-   DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, 
cur_year););
-   if (timelib_is_leap(cur_year)) {
-   tmp_days += DAYS_PER_LYEAR;
+   if (tmp_days < -1460970) {
+   cur_year -= 4000;
+   DEBUG(printf("tmp_days=%lld, year=%lld\n", 
tmp_days, cur_year););
+   tmp_days += 1460970;
} else {
-   tmp_days += DAYS_PER_YEAR;
+   cur_year--;
+   DEBUG(printf("tmp_days=%lld, year=%lld\n", 
tmp_days, cur_year););
+   if (timelib_is_leap(cur_year)) {
+   tmp_days += DAYS_PER_LYEAR;
+   } else {
+   tmp_days += DAYS_PER_YEAR;
+   }
}
}
remainder += SECS_PER_DAY;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests 013.phpt 014.phpt bug41523-64bit.phpt

2008-04-07 Thread Derick Rethans
derick  Mon Apr  7 17:41:58 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/tests 013.phpt 014.phpt bug41523-64bit.phpt 
  Log:
  - MFH: Fixed test cases.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/013.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/date/tests/013.phpt
diff -u php-src/ext/date/tests/013.phpt:1.1.2.2 
php-src/ext/date/tests/013.phpt:1.1.2.2.2.1
--- php-src/ext/date/tests/013.phpt:1.1.2.2 Fri Dec 22 13:07:53 2006
+++ php-src/ext/date/tests/013.phpt Mon Apr  7 17:41:58 2008
@@ -20,7 +20,13 @@
 echo "Done\n";
 ?>
 --EXPECTF--
-object(DateTime)#%d (0) {
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2006-12-12 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
 }
 string(19) "2006.12.12 00:00:00"
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/014.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/date/tests/014.phpt
diff -u php-src/ext/date/tests/014.phpt:1.1.2.2 
php-src/ext/date/tests/014.phpt:1.1.2.2.2.1
--- php-src/ext/date/tests/014.phpt:1.1.2.2 Fri Dec 22 13:07:53 2006
+++ php-src/ext/date/tests/014.phpt Mon Apr  7 17:41:58 2008
@@ -19,7 +19,13 @@
 
 ?>
 --EXPECTF-- 
-object(DateTime)#%d (0) {
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2006-12-12 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
 }
 object(DateTimeZone)#%d (0) {
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523-64bit.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/date/tests/bug41523-64bit.phpt
diff -u php-src/ext/date/tests/bug41523-64bit.phpt:1.1.2.2 
php-src/ext/date/tests/bug41523-64bit.phpt:1.1.2.3
--- php-src/ext/date/tests/bug41523-64bit.phpt:1.1.2.2  Mon Feb 25 22:32:59 2008
+++ php-src/ext/date/tests/bug41523-64bit.phpt  Mon Apr  7 17:41:58 2008
@@ -42,6 +42,12 @@
   bool(false)
 }
 int(-62169984000)
-object(DateTime)#1 (0) {
+object(DateTime)#1 (3) {
+  ["date"]=>
+  string(20) "-0001-11-30 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
 }
 -0001-11-30T00:00:00+



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/tests 013.phpt 014.phpt bug41523-64bit.phpt

2008-04-07 Thread Derick Rethans
derick  Mon Apr  7 17:41:48 2008 UTC

  Modified files:  
/php-src/ext/date/tests 013.phpt 014.phpt bug41523-64bit.phpt 
  Log:
  - Fixed testcases.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/013.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/013.phpt
diff -u php-src/ext/date/tests/013.phpt:1.1 php-src/ext/date/tests/013.phpt:1.2
--- php-src/ext/date/tests/013.phpt:1.1 Fri Dec 22 13:07:26 2006
+++ php-src/ext/date/tests/013.phpt Mon Apr  7 17:41:48 2008
@@ -20,7 +20,13 @@
 echo "Done\n";
 ?>
 --EXPECTF--
-object(DateTime)#%d (0) {
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2006-12-12 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
 }
 string(19) "2006.12.12 00:00:00"
 
@@ -37,7 +43,13 @@
 string(19) "2008.01.29 00:00:00"
 Done
 --UEXPECTF--
-object(DateTime)#%d (0) {
+object(DateTime)#%d (3) {
+  [u"date"]=>
+  unicode(19) "2006-12-12 00:00:00"
+  [u"timezone_type"]=>
+  int(3)
+  [u"timezone"]=>
+  string(3) "UTC"
 }
 unicode(19) "2006.12.12 00:00:00"
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/014.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/014.phpt
diff -u php-src/ext/date/tests/014.phpt:1.1 php-src/ext/date/tests/014.phpt:1.2
--- php-src/ext/date/tests/014.phpt:1.1 Fri Dec 22 13:07:26 2006
+++ php-src/ext/date/tests/014.phpt Mon Apr  7 17:41:48 2008
@@ -19,7 +19,32 @@
 
 ?>
 --EXPECTF-- 
-object(DateTime)#%d (0) {
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2006-12-12 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
+}
+object(DateTimeZone)#%d (0) {
+}
+
+Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on 
line %d
+bool(false)
+int(0)
+
+Warning: timezone_offset_get() expects parameter 1 to be DateTimeZone, object 
given in %s on line %d
+bool(false)
+Done
+--UEXPECTF-- 
+object(DateTime)#%d (3) {
+  [u"date"]=>
+  unicode(19) "2006-12-12 00:00:00"
+  [u"timezone_type"]=>
+  int(3)
+  [u"timezone"]=>
+  string(3) "UTC"
 }
 object(DateTimeZone)#%d (0) {
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523-64bit.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/bug41523-64bit.phpt
diff -u php-src/ext/date/tests/bug41523-64bit.phpt:1.1 
php-src/ext/date/tests/bug41523-64bit.phpt:1.2
--- php-src/ext/date/tests/bug41523-64bit.phpt:1.1  Mon Feb 25 22:32:26 2008
+++ php-src/ext/date/tests/bug41523-64bit.phpt  Mon Apr  7 17:41:48 2008
@@ -42,7 +42,13 @@
   bool(false)
 }
 int(-62169984000)
-object(DateTime)#1 (0) {
+object(DateTime)#1 (3) {
+  ["date"]=>
+  string(20) "-0001-11-30 00:00:00"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
 }
 -0001-11-30T00:00:00+
 --UEXPECT--
@@ -75,6 +81,12 @@
   bool(false)
 }
 int(-62169984000)
-object(DateTime)#1 (0) {
+object(DateTime)#1 (3) {
+  [u"date"]=>
+  unicode(20) "-0001-11-30 00:00:00"
+  [u"timezone_type"]=>
+  int(3)
+  [u"timezone"]=>
+  string(3) "UTC"
 }
 -0001-11-30T00:00:00+



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/openssl xp_ssl.c /ext/soap php_http.c

2008-04-04 Thread Derick Rethans
On Fri, 4 Apr 2008, Ilia Alshanetsky wrote:

> Yeah, should be safe enough.

Will you do another RC then?

regards,
Derick

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / configure.in

2008-04-04 Thread Derick Rethans
derick  Fri Apr  4 07:26:41 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcconfigure.in 
  Log:
  - Fixed typo.
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.93&r2=1.579.2.52.2.94&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.93 
php-src/configure.in:1.579.2.52.2.94
--- php-src/configure.in:1.579.2.52.2.93Fri Apr  4 00:16:53 2008
+++ php-src/configure.inFri Apr  4 07:26:41 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.579.2.52.2.93 2008/04/04 00:16:53 iliaa Exp $ -*- 
autoconf -*-
+## $Id: configure.in,v 1.579.2.52.2.94 2008/04/04 07:26:41 derick Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=2
 PHP_RELEASE_VERSION=6
-PHP_EXTRA_VERSION="RC4-dev"
+PHP_EXTRA_VERSION="RC5-dev"
 
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
 PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 
100 + [$]PHP_RELEASE_VERSION`
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_3) /win32/build config.w32

2008-04-01 Thread Derick Rethans
On Mon, 31 Mar 2008, Marcus Boerger wrote:

> Monday, March 31, 2008, 5:09:23 PM, you wrote:
> 
> > On Mon, 31 Mar 2008, Marcus Boerger wrote:
> 
> >>   this doesn't work! When allowing to wotk with 0.13.3 then you will end up
> >> in a broken .c. Since we have the stuff checked in there really is no need
> >> at all to rengeneerate them atm.
> 
> > I found out that it does not work, but it *HAS* to work for snapshots. 
> > Please either revert the changes to PHP, or make an re2c release that 
> > can generate proper files.
> 
> That is not going to happen if no one cares about creating zend multibyte
> tests. Or we decide on getting rid of that stuff. Because obviously no on
> ecares about it anyway.

Huh, that does not make sense. If you have a version in SVN that can 
generate the correct files, how hard is it to make a release out of 
that? What does it have to do with other missing functionality?

regards,
Derick

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / acinclude.m4

2008-04-01 Thread Derick Rethans
On Mon, 31 Mar 2008, Marcus Boerger wrote:

>   we are relying on it as only current HEAD of re2c can actually build the
> language parser. At the current stage there is noone that must build the
> language scanner. If so you need to install it from re2c's trunc. Otherwise
> you can just take the generated .c files from our CVS.

Like I said, the snapshot builds DO always regenerte those files - and 
they can't know because there is no released version of re2c to do so. 
And obviously we're not going to install non-released software on our 
production machines. So *please* make a release so that we can have 
snapshots again!

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /win32/build config.w32

2008-03-31 Thread Derick Rethans
On Mon, 31 Mar 2008, Steph Fox wrote:

> >  this doesn't work! When allowing to wotk with 0.13.3 then you will end up
> > in a broken .c. Since we have the stuff checked in there really is no need
> > at all to rengeneerate them atm.
> 
> Release 0.13.4, and I'll happily update it! Without that, it doesn't really
> make a lot of difference what I do - I'm just trying to save people from a
> wild goose chase.
> 
> NB it'd be a better idea to have the re2c release before the changes in PHP in
> future...

It's required for source snapshots to work.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_3) /win32/build config.w32

2008-03-31 Thread Derick Rethans
On Mon, 31 Mar 2008, Marcus Boerger wrote:

> Monday, March 31, 2008, 5:09:23 PM, you wrote:
> 
> > On Mon, 31 Mar 2008, Marcus Boerger wrote:
> 
> >>   this doesn't work! When allowing to wotk with 0.13.3 then you 
> >> will end up in a broken .c. Since we have the stuff checked in 
> >> there really is no need at all to rengeneerate them atm.
> 
> > I found out that it does not work, but it *HAS* to work for 
> > snapshots. Please either revert the changes to PHP, or make an re2c 
> > release that can generate proper files.
> 
> That is not going to happen if no one cares about creating zend 
> multibyte tests. Or we decide on getting rid of that stuff. Because 
> obviously no on ecares about it anyway.

Huh? How hard is it to rolll 0.13.4 ? Then the dependency works, the 
snapshots, and nobody has to fuck with timestamps. IE: Everybody happy.

regards,
Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /win32/build config.w32

2008-03-31 Thread Derick Rethans
On Mon, 31 Mar 2008, Marcus Boerger wrote:

> Hello Steph,
> 
>   this doesn't work! When allowing to wotk with 0.13.3 then you will end up
> in a broken .c. Since we have the stuff checked in there really is no need
> at all to rengeneerate them atm.

I found out that it does not work, but it *HAS* to work for snapshots. 
Please either revert the changes to PHP, or make an re2c release that 
can generate proper files.

Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2008-03-31 Thread Derick Rethans
derick  Mon Mar 31 14:40:47 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give karma to David and LUkas for the new testfest web frontend.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1376&r2=1.1377&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1376 CVSROOT/avail:1.1377
--- CVSROOT/avail:1.1376Sat Mar 29 20:44:32 2008
+++ CVSROOT/avail   Mon Mar 31 14:40:46 2008
@@ -28,6 +28,9 @@
 # Win Installer
 avail|edink,jmertic|win-installer
 
+# Testfest web
+avail|davidc,lsmith|php-testfest-web
+
 # The PhD (DocBook build system) lead developers
 avail|bjori,gwynne|phd
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / acinclude.m4

2008-03-31 Thread Derick Rethans
derick  Mon Mar 31 10:08:57 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcacinclude.m4 
  Log:
  - Don't rely on a version that doesn't exist - that breaks snapshots.
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.26.2.4&r2=1.332.2.14.2.26.2.5&diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.332.2.14.2.26.2.4 
php-src/acinclude.m4:1.332.2.14.2.26.2.5
--- php-src/acinclude.m4:1.332.2.14.2.26.2.4Sat Mar 22 17:59:52 2008
+++ php-src/acinclude.m4Mon Mar 31 10:08:57 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.4 2008/03/22 17:59:52 helly Exp $
+dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.5 2008/03/31 10:08:57 derick Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2096,7 +2096,7 @@
   if test -n "$RE2C"; then
 AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
   re2c_vernum=`$RE2C --vernum 2>/dev/null`
-  if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
+  if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1303"; then
 php_cv_re2c_version=invalid
   else
 php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2  2>/dev/null` 
(ok)"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c /ext/date/tests timestamp-in-dst.phpt

2008-03-31 Thread Derick Rethans
derick  Mon Mar 31 09:12:15 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests timestamp-in-dst.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fixed a bug in formatting timestamps when DST is active in the default
timezone.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.56&r2=1.43.2.45.2.57&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.56 
php-src/ext/date/php_date.c:1.43.2.45.2.57
--- php-src/ext/date/php_date.c:1.43.2.45.2.56  Sun Feb  3 14:22:55 2008
+++ php-src/ext/date/php_date.c Mon Mar 31 09:12:15 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.56 2008/02/03 14:22:55 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.57 2008/03/31 09:12:15 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -746,9 +746,9 @@
offset->abbr = strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
-   offset->offset = (t->z - (t->dst * 60)) * -60;
+   offset->offset = (t->z) * -60;
offset->leap_secs = 0;
-   offset->is_dst = t->dst;
+   offset->is_dst = 0;
offset->abbr = malloc(9); /* GMT±\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d", 
  localtime ? ((offset->offset 
< 0) ? '-' : '+') : '+',

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timestamp-in-dst.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/timestamp-in-dst.phpt
+++ php-src/ext/date/tests/timestamp-in-dst.phpt
--TEST--
Format timestamp in DST test
--INI--
date.timezone=CEST
--FILE--
format( 'c' ) );
?>
--EXPECT--
string(25) "2008-02-14T13:34:51+00:00"
--UEXPECT--
unicode(25) "2008-02-14T13:34:51+00:00"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c /ext/date/tests timestamp-in-dst.phpt

2008-03-31 Thread Derick Rethans
derick  Mon Mar 31 09:11:30 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests timestamp-in-dst.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fixed a bug in formatting timestamps when DST is active in the default
timezone.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.28&r2=1.43.2.45.2.51.2.29&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.28 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.29
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.28 Thu Mar 20 19:43:36 2008
+++ php-src/ext/date/php_date.c Mon Mar 31 09:11:30 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.28 2008/03/20 19:43:36 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.29 2008/03/31 09:11:30 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -765,9 +765,9 @@
offset->abbr = strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
-   offset->offset = (t->z - (t->dst * 60)) * -60;
+   offset->offset = (t->z) * -60;
offset->leap_secs = 0;
-   offset->is_dst = t->dst;
+   offset->is_dst = 0;
offset->abbr = malloc(9); /* GMT±\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d", 
  localtime ? ((offset->offset 
< 0) ? '-' : '+') : '+',

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timestamp-in-dst.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/timestamp-in-dst.phpt
+++ php-src/ext/date/tests/timestamp-in-dst.phpt
--TEST--
Format timestamp in DST test
--INI--
date.timezone=CEST
--FILE--
format( 'c' ) );
?>
--EXPECT--
string(25) "2008-02-14T13:34:51+00:00"
--UEXPECT--
unicode(25) "2008-02-14T13:34:51+00:00"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests timestamp-in-dst.phpt

2008-03-31 Thread Derick Rethans
derick  Mon Mar 31 09:10:54 2008 UTC

  Added files: 
/php-src/ext/date/tests timestamp-in-dst.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed a bug in formatting timestamps when DST is active in the default
timezone.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.175&r2=1.176&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.175 php-src/ext/date/php_date.c:1.176
--- php-src/ext/date/php_date.c:1.175   Thu Mar 20 19:43:02 2008
+++ php-src/ext/date/php_date.c Mon Mar 31 09:10:54 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.175 2008/03/20 19:43:02 derick Exp $ */
+/* $Id: php_date.c,v 1.176 2008/03/31 09:10:54 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -868,9 +868,9 @@
offset->abbr = strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
-   offset->offset = (t->z - (t->dst * 60)) * -60;
+   offset->offset = (t->z) * -60;
offset->leap_secs = 0;
-   offset->is_dst = t->dst;
+   offset->is_dst = 0;
offset->abbr = malloc(9); /* GMT±\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d", 
  localtime ? ((offset->offset 
< 0) ? '-' : '+') : '+',

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timestamp-in-dst.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/timestamp-in-dst.phpt
+++ php-src/ext/date/tests/timestamp-in-dst.phpt
--TEST--
Format timestamp in DST test
--INI--
date.timezone=CEST
--FILE--
format( 'c' ) );
?>
--EXPECT--
string(25) "2008-02-14T13:34:51+00:00"
--UEXPECT--
unicode(25) "2008-02-14T13:34:51+00:00"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2008-03-27 Thread Derick Rethans
derick  Thu Mar 27 10:31:40 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give lukas qaweb karma.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1374&r2=1.1375&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1374 CVSROOT/avail:1.1375
--- CVSROOT/avail:1.1374Sun Mar 23 14:51:56 2008
+++ CVSROOT/avail   Thu Mar 27 10:31:40 2008
@@ -54,7 +54,7 @@
 
 # The PHP Quality Assurance Team maintains their own website.
 
-avail|ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes|qaweb
+avail|ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes,lsmith|qaweb
 
 # Some people get only access to specific languages for phpdoc
 avail|diab,daif,salehcoder|phpdoc-ar



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main/streams mmap.c

2008-03-21 Thread Derick Rethans
On Fri, 21 Mar 2008, Marcus Boerger wrote:

>   /* For now, we impose an arbitrary 2MB limit to avoid
>* runaway swapping when large files are passed thru. */
> - if (length > 2 * 1024 * 1024) {
> + if (length > 8 * 1024 * 1024) {

Fix the comment too please? :)

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2008-03-21 Thread Derick Rethans
On Fri, 21 Mar 2008, Antony Dovgal wrote:

> On 03/20/2008 09:12 PM, Stanislav Malyshev wrote:
> > +- Allowed user-level access for short_open_tag. (Stas)
> 
> -1
> 
> > Now you force people to put something like "ini_set('short_open_tag', 0);" 
> > in 
> > each script to be sure it's not being enabled.
> 
> +1
> 
> Please revert.

Yeah, I also think this is a bad idea. For example when an application 
turns short tags on, while a library that it uses relies on it being of 
because it handles XML stuff in a way the application doesn;t (and 
shouldn't) know about. Like you said, it forces those libs to put 
"ini_set('short_open_tag', 0);" everywhere. And for what it's worth, 
I've never seen the original "question" either.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-03-20 Thread Derick Rethans
derick  Thu Mar 20 19:43:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fix the DateTimeZone::getTransitions() algorithm.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.27&r2=1.43.2.45.2.51.2.28&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.27 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.28
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.27 Sun Mar 16 15:15:21 2008
+++ php-src/ext/date/php_date.c Thu Mar 20 19:43:36 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.27 2008/03/16 15:15:21 iliaa Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.28 2008/03/20 19:43:36 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2604,7 +2604,7 @@
 {
zval*object, *element;
php_timezone_obj*tzobj;
-   int  i, first = 1;
+   int  i, begin = 0, found;
long timestamp_begin = LONG_MIN, timestamp_end = 
LONG_MAX;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O|ll", &object, date_ce_timezone, ×tamp_begin, ×tamp_end) == 
FAILURE) {
@@ -2616,31 +2616,64 @@
RETURN_FALSE;
}
 
+#define add_nominal() \
+   MAKE_STD_ZVAL(element); \
+   array_init(element); \
+   add_assoc_long(element, "ts", timestamp_begin); \
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0); \
+   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[0].offset); \
+   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[0].isdst); \
+   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[0].abbr_idx], 1); \
+   add_next_index_zval(return_value, element);
+
+#define add(i,ts) \
+   MAKE_STD_ZVAL(element); \
+   array_init(element); \
+   add_assoc_long(element, "ts", ts); \
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, ts, 0 TSRMLS_CC), 0); \
+   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset); \
+   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst); \
+   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
 1); \
+   add_next_index_zval(return_value, element);
+
+#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin)
+
array_init(return_value);
-   for (i = 0; i < tzobj->tzi.tz->timecnt; ++i) {
-   if (tzobj->tzi.tz->trans[i] >= timestamp_begin && 
tzobj->tzi.tz->trans[i] < timestamp_end) {
-   if (first && timestamp_begin != LONG_MIN && i > 0 && 
timestamp_begin != tzobj->tzi.tz->trans[i])
-   {
-   MAKE_STD_ZVAL(element);
-   array_init(element);
-   add_assoc_long(element, "ts", 
timestamp_begin);
-   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0);
-   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].offset);
-   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].isdst);
-   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].abbr_idx],
 1);
 
-   add_next_index_zval(return_value, element);
-   }
-   MAKE_STD_ZVAL(element);
-   array_init(element);
-   add_assoc_long(element, "ts", 
tzobj->tzi.tz->trans[i]);
-   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 TSRMLS_CC), 
0);
-   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset);
-   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst);
-   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
 1);
+   if (timestamp_begin == LONG_MIN) {
+   add_nominal();
+   begin = 0;
+   found = 1;
+   } else {
+   begin = 0;
+   found = 0;
+   if (tzobj->tzi.tz->timecnt 

[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-03-20 Thread Derick Rethans
derick  Thu Mar 20 19:43:02 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fix the DateTimeZone::getTransitions() algorithm.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.174&r2=1.175&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.174 php-src/ext/date/php_date.c:1.175
--- php-src/ext/date/php_date.c:1.174   Sun Mar 16 15:15:47 2008
+++ php-src/ext/date/php_date.c Thu Mar 20 19:43:02 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.174 2008/03/16 15:15:47 iliaa Exp $ */
+/* $Id: php_date.c,v 1.175 2008/03/20 19:43:02 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2763,7 +2763,7 @@
 {
zval*object, *element;
php_timezone_obj*tzobj;
-   int  i, first = 1;
+   int  i, begin = 0, found;
long timestamp_begin = LONG_MIN, timestamp_end = 
LONG_MAX;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O|ll", &object, date_ce_timezone, ×tamp_begin, ×tamp_end) == 
FAILURE) {
@@ -2775,39 +2775,72 @@
RETURN_FALSE;
}
 
+#define add_nominal() \
+   MAKE_STD_ZVAL(element); \
+   array_init(element); \
+   add_ascii_assoc_long(element, "ts", timestamp_begin); \
+   if (UG(unicode)) { \
+   add_ascii_assoc_unicode(element, "time", (UChar*) 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0); \
+   } else { \
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0); \
+   } \
+   add_ascii_assoc_long(element, "offset", 
tzobj->tzi.tz->type[0].offset); \
+   add_ascii_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[0].isdst); \
+   add_ascii_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[0].abbr_idx], 1); \
+   add_next_index_zval(return_value, element);
+
+#define add(i,ts) \
+   MAKE_STD_ZVAL(element); \
+   array_init(element); \
+   add_ascii_assoc_long(element, "ts", ts); \
+   if (UG(unicode)) { \
+   add_ascii_assoc_unicode(element, "time", (UChar*) 
php_format_date(DATE_FORMAT_ISO8601, 13, ts, 0 TSRMLS_CC), 0); \
+   } else { \
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, ts, 0 TSRMLS_CC), 0); \
+   } \
+   add_ascii_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset); \
+   add_ascii_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst); \
+   add_ascii_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
 1); \
+   add_next_index_zval(return_value, element);
+
+#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin)
+
array_init(return_value);
-   for (i = 0; i < tzobj->tzi.tz->timecnt; ++i) {
-   if (tzobj->tzi.tz->trans[i] >= timestamp_begin && 
tzobj->tzi.tz->trans[i] < timestamp_end) {
-   if (first && timestamp_begin != LONG_MIN && i > 0 && 
timestamp_begin != tzobj->tzi.tz->trans[i])
-   {
-   MAKE_STD_ZVAL(element);
-   array_init(element);
-   add_ascii_assoc_long(element, "ts", 
timestamp_begin);
-   if (UG(unicode)) {
-   add_ascii_assoc_unicode(element, 
"time", (UChar*) php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 
TSRMLS_CC), 0);
-   } else {
-   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0);
+  
+   if (timestamp_begin == LONG_MIN) {
+   add_nominal();
+   begin = 0;
+   found = 1;
+   } else {
+   begin = 0;
+   found = 0;
+   if (tzobj->tzi.tz->timecnt > 0) {
+   do {
+   if (tzobj->tzi.tz->trans[begin] > 
timestamp_begin) {
+   if (begin > 0) {
+   add(begin - 1, timestamp_begin);
+   } else {
+   add_nominal();
+   }
+   found = 1;
+   break;
}
-   

[PHP-CVS] cvs: CVSROOT / avail

2008-03-19 Thread Derick Rethans
derick  Wed Mar 19 15:14:01 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give bjori systems karma now he has a shell account.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1371&r2=1.1372&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1371 CVSROOT/avail:1.1372
--- CVSROOT/avail:1.1371Mon Mar 17 00:14:27 2008
+++ CVSROOT/avail   Wed Mar 19 15:14:00 2008
@@ -123,7 +123,7 @@
 avail|changelog|php-src,php-gtk,Zend,ZendEngine2,smarty
 
 # Some people have access to change the day-to-day code on the various php.net 
machines
-avail|imajes,edink,derick,sfox,wez,goba,mj,pajoye|systems
+avail|imajes,edink,derick,sfox,wez,goba,mj,pajoye,bjori|systems
 
 # Finally, there are various people with access to various bits and
 # pieces of other CVS modules.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib timezonedb.h

2008-03-16 Thread Derick Rethans
derick  Sun Mar 16 07:22:11 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date/lib   timezonedb.h 
  Log:
  - Updated to version 2008.1 (2008a)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timezonedb.h?r1=1.4.2.7.2.14&r2=1.4.2.7.2.15&diff_format=u
Index: php-src/ext/date/lib/timezonedb.h
diff -u php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.14 
php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.15
--- php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.14  Tue Jan  1 15:32:28 2008
+++ php-src/ext/date/lib/timezonedb.h   Sun Mar 16 07:22:10 2008
@@ -5721,7 +5721,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10941,7 +10941,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10996,7 +10996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -15996,7 +15996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -17406,4 +17406,4 @@
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 
0x00, 0x00, 0x00, 
 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, };
 
-const timelib_tzdb timezonedb_builtin = { "2007.11", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2008.1", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib timezonedb.h

2008-03-16 Thread Derick Rethans
derick  Sun Mar 16 07:21:01 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   timezonedb.h 
  Log:
  - Updated to version 2008.1 (2008a)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timezonedb.h?r1=1.4.2.7.2.10.2.4&r2=1.4.2.7.2.10.2.5&diff_format=u
Index: php-src/ext/date/lib/timezonedb.h
diff -u php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.10.2.4 
php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.10.2.5
--- php-src/ext/date/lib/timezonedb.h:1.4.2.7.2.10.2.4  Tue Jan  1 15:32:05 2008
+++ php-src/ext/date/lib/timezonedb.h   Sun Mar 16 07:21:00 2008
@@ -5721,7 +5721,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10941,7 +10941,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10996,7 +10996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -15996,7 +15996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -17406,4 +17406,4 @@
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 
0x00, 0x00, 0x00, 
 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, };
 
-const timelib_tzdb timezonedb_builtin = { "2007.11", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2008.1", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib timezonedb.h

2008-03-16 Thread Derick Rethans
derick  Sun Mar 16 07:20:17 2008 UTC

  Modified files:  
/php-src/ext/date/lib   timezonedb.h 
  Log:
  - Updated to version 2008.1 (2008a)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timezonedb.h?r1=1.24&r2=1.25&diff_format=u
Index: php-src/ext/date/lib/timezonedb.h
diff -u php-src/ext/date/lib/timezonedb.h:1.24 
php-src/ext/date/lib/timezonedb.h:1.25
--- php-src/ext/date/lib/timezonedb.h:1.24  Tue Jan  1 15:31:43 2008
+++ php-src/ext/date/lib/timezonedb.h   Sun Mar 16 07:20:17 2008
@@ -5721,7 +5721,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10941,7 +10941,7 @@
 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 
0x6A, 0xAE, 0x30, 
 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 
0x33, 0xAC, 0xB0, 
 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 
0xF3, 0x70, 0xB0, 
-0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
+0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 
0xBC, 0x6F, 0x30, 
 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 
0x7C, 0x33, 0x30, 
 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 
0x3B, 0xF7, 0x30, 
 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 
0x04, 0xF5, 0xB0, 
@@ -10996,7 +10996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -15996,7 +15996,7 @@
 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, 0x3D, 
0xA8, 0xEF, 0xC0, 
 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 
0x68, 0xB3, 0xC0, 
 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 
0x31, 0xB2, 0x40, 
-0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xD3, 0x52, 0xB0, 0x48, 
0xF1, 0x76, 0x40, 
+0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 
0xF1, 0x76, 0x40, 
 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 
0xB1, 0x3A, 0x40, 
 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 
0x7A, 0x38, 0xC0, 
 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 
0x39, 0xFC, 0xC0, 
@@ -17406,4 +17406,4 @@
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 
0x00, 0x00, 0x00, 
 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, };
 
-const timelib_tzdb timezonedb_builtin = { "2007.11", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2008.1", 554, 
timezonedb_idx_builtin, timelib_timezone_db_data_builtin };



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c php_date.h

2008-03-14 Thread Derick Rethans
derick  Fri Mar 14 16:19:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/date   php_date.c php_date.h 
  Log:
  - MFH: Allow datetime objects to be serialized and woken up.
  - MFH: Implemented __set_state().
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.140&r2=1.2027.2.547.2.965.2.141&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.140 
php-src/NEWS:1.2027.2.547.2.965.2.141
--- php-src/NEWS:1.2027.2.547.2.965.2.140   Thu Mar 13 15:59:48 2008
+++ php-src/NEWSFri Mar 14 16:19:51 2008
@@ -39,6 +39,7 @@
 returned.
   . support for "first/last day of " style texts.
   . support for date/time strings returned by MS SQL.
+  . support for serialization and unserialization of DateTime objects.
 - Added functionality to SPL extension:
   . Added ability to store associative information with objects in
 SplObjectStorage. (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.24&r2=1.43.2.45.2.51.2.25&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.24 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.25
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.24 Mon Mar 10 22:12:33 2008
+++ php-src/ext/date/php_date.c Fri Mar 14 16:19:52 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.24 2008/03/10 22:12:33 felipe Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.25 2008/03/14 16:19:52 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -205,6 +205,8 @@
 
 const zend_function_entry date_funcs_date[] = {
PHP_ME(DateTime,__construct,NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+   PHP_ME(DateTime,__wakeup,   
NULL, ZEND_ACC_PUBLIC)
+   PHP_ME(DateTime,__set_state,NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(createFromFormat, date_create_from_format,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(getLastErrors, date_get_last_errors, NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(format,  date_format,NULL, 0)
@@ -272,6 +274,7 @@
 struct _php_date_obj {
zend_object   std;
timelib_time *time;
+   HashTable*props;
 };
 
 struct _php_timezone_obj {
@@ -320,6 +323,7 @@
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
+static HashTable *date_object_get_properties(zval *object TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
 /* This is need to ensure that session extension request shutdown occurs 1st, 
because it uses the date extension */ 
@@ -1524,6 +1528,7 @@
memcpy(&date_object_handlers_date, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_date.clone_obj = date_object_clone_date;
date_object_handlers_date.compare_objects = date_object_compare_date;
+   date_object_handlers_date.get_properties = date_object_get_properties;
 
 #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_stringl(date_ce_date, const_name, 
sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
@@ -1633,6 +1638,59 @@
return 1;
 }
 
+static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
+{
+   HashTable *props;
+   zval *zv;
+   php_date_obj *dateobj;
+
+
+   dateobj = (php_date_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
+
+   props = dateobj->std.properties;
+
+   if (!dateobj->time) {
+   return props;
+   }
+
+   // first we add the date and time in ISO format
+   MAKE_STD_ZVAL(zv);
+   ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
+   zend_hash_update(props, "date", 5, &zv, sizeof(zval), NULL);
+
+   // then we add the timezone name (or similar)
+   if (dateobj->time->is_localtime) {
+   MAKE_STD_ZVAL(zv);
+   ZVAL_LONG(zv, dateobj->time->zone_type);
+   zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), 
NULL);
+
+   MAKE_STD_ZVAL(zv);
+   switch (dateobj->time->zone_type) {
+   case TIMELIB_ZONETYPE_ID:
+   ZVAL_STRING(zv, dateobj->time->tz_info->name, 
1);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET: {
+   char *tmpstr = emalloc(sizeof("UTC+05:00"));
+   timelib_sll utc_offset = dateobj->time->z;
+
+  

[PHP-CVS] cvs: php-src /ext/date php_date.c php_date.h

2008-03-14 Thread Derick Rethans
derick  Fri Mar 14 16:18:26 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c php_date.h 
  Log:
  - Allow datetime objects to be serialized and woken up.
  - Implemented __set_state().
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.171&r2=1.172&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.171 php-src/ext/date/php_date.c:1.172
--- php-src/ext/date/php_date.c:1.171   Sun Mar  9 18:10:09 2008
+++ php-src/ext/date/php_date.c Fri Mar 14 16:18:25 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.171 2008/03/09 18:10:09 iliaa Exp $ */
+/* $Id: php_date.c,v 1.172 2008/03/14 16:18:25 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -207,8 +207,10 @@
 
 const zend_function_entry date_funcs_date[] = {
PHP_ME(DateTime,__construct,   NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
-   PHP_ME_MAPPING(createFromFormat, date_create_from_format,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
-   PHP_ME_MAPPING(getLastErrors, date_get_last_errors, NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+   PHP_ME(DateTime,__wakeup,  NULL, ZEND_ACC_PUBLIC)
+   PHP_ME(DateTime,__set_state,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+   PHP_ME_MAPPING(createFromFormat, date_create_from_format, NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+   PHP_ME_MAPPING(getLastErrors, date_get_last_errors,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(format,  date_format,   NULL, 0)
PHP_ME_MAPPING(modify,  date_modify,   NULL, 0)
PHP_ME_MAPPING(getTimezone, date_timezone_get, NULL, 0)
@@ -273,6 +275,7 @@
 struct _php_date_obj {
zend_object   std;
timelib_time *time;
+   HashTable*props;
 };
 
 struct _php_timezone_obj {
@@ -321,6 +324,7 @@
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
+static HashTable *date_object_get_properties(zval *object TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
 /* This is need to ensure that session extension request shutdown occurs 1st, 
because it uses the date extension */ 
@@ -1649,6 +1653,7 @@
memcpy(&date_object_handlers_date, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_date.clone_obj = date_object_clone_date;
date_object_handlers_date.compare_objects = date_object_compare_date;
+   date_object_handlers_date.get_properties = date_object_get_properties;
 
 #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_stringl(date_ce_date, const_name, 
sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
@@ -1758,6 +1763,65 @@
return 1;
 }
 
+static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
+{
+   HashTable*props;
+   zval *zv;
+   php_date_obj *dateobj;
+   char *str;
+   int   return_len;
+
+   dateobj = (php_date_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
+
+   props = dateobj->std.properties;
+
+   if (!dateobj->time) {
+   return props;
+   }
+
+   // first we add the date and time in ISO format
+   str = date_format("Y-m-d H:i:s", 12, &return_len, dateobj->time, 1, 0);
+   MAKE_STD_ZVAL(zv);
+   if (UG(unicode)) {
+   ZVAL_UNICODEL(zv, (UChar*) str, return_len - 1, 0);
+   } else {
+   ZVAL_STRINGL(zv, str, return_len - 1, 0);
+   }
+   zend_hash_update(props, "date", 5, &zv, sizeof(zval), NULL);
+
+   // then we add the timezone name (or similar)
+   if (dateobj->time->is_localtime) {
+   MAKE_STD_ZVAL(zv);
+   ZVAL_LONG(zv, dateobj->time->zone_type);
+   zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), 
NULL);
+
+   MAKE_STD_ZVAL(zv);
+   switch (dateobj->time->zone_type) {
+   case TIMELIB_ZONETYPE_ID:
+   ZVAL_STRING(zv, dateobj->time->tz_info->name, 
1);
+   break;
+   case TIMELIB_ZONETYPE_OFFSET: {
+   char *tmpstr = emalloc(sizeof("UTC+05:00"));
+   timelib_sll utc_offset = dateobj->time->z;
+
+   snprintf(tmpstr, sizeof("+05:00"), 
"%c%02d:%02d",
+   utc_offset > 0 ? '-' : '+',
+   abs(utc_offset / 60),
+   abs((utc_offset % 60)));
+
+   ZVAL_STRING(zv, tmpstr, 0);
+ 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date/lib timelib_structs.h

2008-03-13 Thread Derick Rethans
derick  Thu Mar 13 15:59:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/date/lib   timelib_structs.h 
  Log:
  - Fixed bug #44257 (timelib_tz_lookup_table must use float for gmtoffset).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.139&r2=1.2027.2.547.2.965.2.140&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.139 
php-src/NEWS:1.2027.2.547.2.965.2.140
--- php-src/NEWS:1.2027.2.547.2.965.2.139   Thu Mar 13 15:54:09 2008
+++ php-src/NEWSThu Mar 13 15:59:48 2008
@@ -132,6 +132,8 @@
 - Fixed bug #44414 (Incomplete reporting about abstract methods). (Dmitry)
 - Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
   (frode at coretrek dot com, Nuno)
+- Fixed bug #44257 (timelib_tz_lookup_table must use float for gmtoffset). 
+  (Derick, iuri dot fiedoruk at hp dot com).
 - Fixed bug #44214 (Crash using preg_replace_callback() and global variable).
   (Nuno, Scott)
 - Fixed bug #43960 (strtotime() returns timestamp in the future when given a
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib_structs.h?r1=1.13.2.6.2.3.2.2&r2=1.13.2.6.2.3.2.3&diff_format=u
Index: php-src/ext/date/lib/timelib_structs.h
diff -u php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.3.2.2 
php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.3.2.3
--- php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.3.2.2 Sun Feb  3 
14:15:07 2008
+++ php-src/ext/date/lib/timelib_structs.h  Thu Mar 13 15:59:48 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: timelib_structs.h,v 1.13.2.6.2.3.2.2 2008/02/03 14:15:07 derick Exp $ 
*/
+/* $Id: timelib_structs.h,v 1.13.2.6.2.3.2.3 2008/03/13 15:59:48 derick Exp $ 
*/
 
 #ifndef __TIMELIB_STRUCTS_H__
 #define __TIMELIB_STRUCTS_H__
@@ -178,7 +178,7 @@
 typedef struct _timelib_tz_lookup_table {
char   *name;
int type;
-   int gmtoffset;
+   float   gmtoffset;
char   *full_tz_name;
 } timelib_tz_lookup_table;
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib timelib_structs.h

2008-03-13 Thread Derick Rethans
derick  Thu Mar 13 16:00:19 2008 UTC

  Modified files:  
/php-src/ext/date/lib   timelib_structs.h 
  Log:
  - MF53: Fixed bug #44257 (timelib_tz_lookup_table must use float for
gmtoffset).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib_structs.h?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/date/lib/timelib_structs.h
diff -u php-src/ext/date/lib/timelib_structs.h:1.25 
php-src/ext/date/lib/timelib_structs.h:1.26
--- php-src/ext/date/lib/timelib_structs.h:1.25 Sun Feb  3 14:10:48 2008
+++ php-src/ext/date/lib/timelib_structs.h  Thu Mar 13 16:00:18 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: timelib_structs.h,v 1.25 2008/02/03 14:10:48 derick Exp $ */
+/* $Id: timelib_structs.h,v 1.26 2008/03/13 16:00:18 derick Exp $ */
 
 #ifndef __TIMELIB_STRUCTS_H__
 #define __TIMELIB_STRUCTS_H__
@@ -178,7 +178,7 @@
 typedef struct _timelib_tz_lookup_table {
char   *name;
int type;
-   int gmtoffset;
+   float   gmtoffset;
char   *full_tz_name;
 } timelib_tz_lookup_table;
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2008-03-05 Thread Derick Rethans
derick  Wed Mar  5 19:42:06 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - php src karma for lars (on request by helly)
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1364&r2=1.1365&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1364 CVSROOT/avail:1.1365
--- CVSROOT/avail:1.1364Wed Mar  5 17:47:41 2008
+++ CVSROOT/avail   Wed Mar  5 19:42:06 2008
@@ -17,7 +17,7 @@
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.
 
-avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
+avail|lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,go!
 
palv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
 
 # Some people have access to tests in the Engine
 avail|magnus,michael,zoe,jmessa|Zend/tests,ZendEngine2/tests



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2008-03-04 Thread Derick Rethans
derick  Tue Mar  4 21:51:38 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Add karma for php-wiki-web
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1362&r2=1.1363&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1362 CVSROOT/avail:1.1363
--- CVSROOT/avail:1.1362Mon Mar  3 12:43:55 2008
+++ CVSROOT/avail   Tue Mar  4 21:51:38 2008
@@ -53,7 +53,7 @@
 # The PHP Web Group maintains www.php.net, news.php.net, bugs.php.net,
 # and master.php.net.
 
-avail|jmertic,lsmith,johannes,ilia,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori|phpweb,php-bugs-web,php-master-web,php-news-web,php-hosts-web
+avail|jmertic,lsmith,johannes,ilia,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori|phpweb,php-bugs-web,php-master-web,php-news-web,php-hosts-web,php-wiki-web
 
 # The PHP Presentation Group has access to the presentations on the
 # conf.php.net site.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-02-27 Thread Derick Rethans
derick  Wed Feb 27 09:47:35 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fixed bug #44260 (African timezones missing).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.20&r2=1.43.2.45.2.51.2.21&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.20 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.21
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.20 Sat Feb 23 17:06:21 2008
+++ php-src/ext/date/php_date.c Wed Feb 27 09:47:35 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.20 2008/02/23 17:06:21 helly Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.21 2008/02/27 09:47:35 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1500,18 +1500,19 @@
 }
 /* }}} */
 
-#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
-#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
-#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
-#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
-#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
-#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
-#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
-#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
-#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
-#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
-#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
-#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+#define PHP_DATE_TIMEZONE_GROUP_AFRICA 0x0001
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0020
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0040
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0100
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0400
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
 static void date_register_classes(TSRMLS_D)
 {
@@ -1549,6 +1550,7 @@
 #define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
 
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AFRICA",  
PHP_DATE_TIMEZONE_GROUP_AFRICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("AMERICA", 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("ANTARCTICA",  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("ARCTIC",  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
@@ -2507,6 +2509,7 @@
 
 static int check_id_allowed(char *id, long what)
 {
+   if (what & PHP_DATE_TIMEZONE_GROUP_AFRICA && strncasecmp(id, 
"Africa/",  7) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_AMERICA&& strncasecmp(id, 
"America/", 8) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_ANTARCTICA && strncasecmp(id, 
"Antarctica/", 11) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_ARCTIC && strncasecmp(id, 
"Arctic/",  7) == 0) return 1;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-02-27 Thread Derick Rethans
derick  Wed Feb 27 09:47:24 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #44260 (African timezones missing).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.167&r2=1.168&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.167 php-src/ext/date/php_date.c:1.168
--- php-src/ext/date/php_date.c:1.167   Mon Feb 25 22:32:26 2008
+++ php-src/ext/date/php_date.c Wed Feb 27 09:47:23 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.167 2008/02/25 22:32:26 derick Exp $ */
+/* $Id: php_date.c,v 1.168 2008/02/27 09:47:23 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1625,18 +1625,19 @@
 }
 /* }}} */
 
-#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
-#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
-#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
-#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
-#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
-#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
-#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
-#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
-#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
-#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
-#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
-#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+#define PHP_DATE_TIMEZONE_GROUP_AFRICA 0x0001
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0020
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0040
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0100
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0400
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
 static void date_register_classes(TSRMLS_D)
 {
@@ -1674,6 +1675,7 @@
 #define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
 
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AFRICA",  
PHP_DATE_TIMEZONE_GROUP_AFRICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("AMERICA", 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("ANTARCTICA",  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
REGISTER_TIMEZONE_CLASS_CONST_STRING("ARCTIC",  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
@@ -2668,6 +2670,7 @@
 
 static int check_id_allowed(char *id, long what)
 {
+   if (what & PHP_DATE_TIMEZONE_GROUP_AFRICA && strncasecmp(id, 
"Africa/",  7) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_AMERICA&& strncasecmp(id, 
"America/", 8) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_ANTARCTICA && strncasecmp(id, 
"Antarctica/", 11) == 0) return 1;
if (what & PHP_DATE_TIMEZONE_GROUP_ARCTIC && strncasecmp(id, 
"Arctic/",  7) == 0) return 1;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests bug41523-64bit.phpt bug41523.phpt mktime-3-64bit.phpt mktime-3.phpt strtotime-mysql-64bit.phpt strtotime-mysql.phpt strtotime3-64bit.phpt strtotime3.php

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 22:34:11 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/wddx/tests 001-64bit.phpt 
/php-src/ext/date/tests bug41523-64bit.phpt mktime-3-64bit.phpt 
strtotime-mysql-64bit.phpt 
strtotime3-64bit.phpt 

  Modified files:  
/php-src/ext/wddx/tests 001.phpt 
/php-src/ext/date/tests bug41523.phpt mktime-3.phpt 
strtotime-mysql.phpt strtotime3.phpt 
  Log:
  - MFH: Fixed tests on 64bit platform.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001.phpt?r1=1.5.4.1.2.1&r2=1.5.4.1.2.2&diff_format=u
Index: php-src/ext/wddx/tests/001.phpt
diff -u php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.1 
php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.2
--- php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.1 Fri May 18 11:29:55 2007
+++ php-src/ext/wddx/tests/001.phpt Mon Feb 25 22:34:11 2008
@@ -1,7 +1,8 @@
 --TEST--
-wddx deserialization test
+wddx deserialization test (32-bit)
 --SKIPIF--
 
+
 --INI--
 precision=14
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/date/tests/bug41523.phpt
diff -u php-src/ext/date/tests/bug41523.phpt:1.1.2.2 
php-src/ext/date/tests/bug41523.phpt:1.1.2.3
--- php-src/ext/date/tests/bug41523.phpt:1.1.2.2Thu Jul 12 18:58:00 2007
+++ php-src/ext/date/tests/bug41523.phptMon Feb 25 22:34:11 2008
@@ -1,5 +1,7 @@
 --TEST--
-Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30)
+Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.1.2.3&r2=1.1.2.3.2.1&diff_format=u
Index: php-src/ext/date/tests/mktime-3.phpt
diff -u php-src/ext/date/tests/mktime-3.phpt:1.1.2.3 
php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.2.1
--- php-src/ext/date/tests/mktime-3.phpt:1.1.2.3Mon Dec  5 17:27:01 2005
+++ php-src/ext/date/tests/mktime-3.phptMon Feb 25 22:34:11 2008
@@ -1,5 +1,7 @@
 --TEST--
-mktime() [3]
+mktime() [3] (32-bit)
+--SKIPIF--
+
 --INI--
 error_reporting=2047
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime-mysql.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/date/tests/strtotime-mysql.phpt
diff -u php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.1 
php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.2
--- php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.1 Fri Jun 16 22:46:57 2006
+++ php-src/ext/date/tests/strtotime-mysql.phpt Mon Feb 25 22:34:11 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() and mysql timestamps
+strtotime() and mysql timestamps (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime3.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/date/tests/strtotime3.phpt
diff -u php-src/ext/date/tests/strtotime3.phpt:1.1.2.2 
php-src/ext/date/tests/strtotime3.phpt:1.1.2.3
--- php-src/ext/date/tests/strtotime3.phpt:1.1.2.2  Sat Jun 17 10:30:23 2006
+++ php-src/ext/date/tests/strtotime3.phpt  Mon Feb 25 22:34:11 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() function
+strtotime() function (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001-64bit.phpt?view=markup&rev=1.1
Index: php-src/ext/wddx/tests/001-64bit.phpt
+++ php-src/ext/wddx/tests/001-64bit.phpt
--TEST--
wddx deserialization test (64-bit)
--SKIPIF--


--INI--
precision=14
--FILE--

--EXPECT--
array(11) {
  ["aNull"]=>
  NULL
  ["aString"]=>
  string(8) "a string"
  ["aNumber"]=>
  float(-12.456)
  ["aDateTime"]=>
  int(897625932)
  ["aDateTime2"]=>
  int(329632332)
  ["aDateTime3"]=>
  int(2223088332)
  ["aBoolean"]=>
  bool(true)
  ["anArray"]=>
  array(2) {
[0]=>
int(10)
[1]=>
string(14) "second element"
  }
  ["aBinary"]=>
  string(11) "binary data"
  ["anObject"]=>
  array(2) {
["s"]=>
string(8) "a string"
["n"]=>
float(-12.456)
  }
  ["aRecordset"]=>
  array(2) {
["NAME"]=>
array(2) {
  [0]=>
  string(8) "John Doe"
  [1]=>
  string(8) "Jane Doe"
}
["AGE"]=>
array(2) {
  [0]=>
  int(34)
  [1]=>
  int(31)
}
  }
}

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523-64bit.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug41523-64bit.phpt
+++ php-src/ext/date/tests/bug41523-64bit.phpt
--TEST--
Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30) (64 bit)
--SKIPIF--

--FILE--
format( DateTime::ISO8601 ), "\n";

?>
--EXPECT--
array(12) {
  ["year"]=>
  int(0)
  ["month"]=>
  int(0)
  ["day"]=>
  int(0)
  ["hour"]=>
  int(0)
  ["minute"]=>
  int(0)
  ["second"]=>
  int(0)
  ["fraction"]=>
  float(0)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
int(-6216

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests bug41523-64bit.phpt bug41523.phpt mktime-3-64bit.phpt mktime-3.phpt strtotime-mysql-64bit.phpt strtotime-mysql.phpt strtotime3-64bit.phpt strtotime3.php

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 22:32:59 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/wddx/tests 001-64bit.phpt 
/php-src/ext/date/tests bug41523-64bit.phpt mktime-3-64bit.phpt 
strtotime-mysql-64bit.phpt 
strtotime3-64bit.phpt 

  Modified files:  
/php-src/ext/wddx/tests 001.phpt 
/php-src/ext/date/tests bug41523.phpt mktime-3.phpt 
strtotime-mysql.phpt strtotime3.phpt 
  Log:
  - MFH: Fixed tests on 64bit platform.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001.phpt?r1=1.5.4.1.2.1&r2=1.5.4.1.2.1.2.1&diff_format=u
Index: php-src/ext/wddx/tests/001.phpt
diff -u php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.1 
php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.1.2.1
--- php-src/ext/wddx/tests/001.phpt:1.5.4.1.2.1 Fri May 18 11:29:55 2007
+++ php-src/ext/wddx/tests/001.phpt Mon Feb 25 22:32:59 2008
@@ -1,7 +1,8 @@
 --TEST--
-wddx deserialization test
+wddx deserialization test (32-bit)
 --SKIPIF--
 
+
 --INI--
 precision=14
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/date/tests/bug41523.phpt
diff -u php-src/ext/date/tests/bug41523.phpt:1.1.2.2 
php-src/ext/date/tests/bug41523.phpt:1.1.2.2.2.1
--- php-src/ext/date/tests/bug41523.phpt:1.1.2.2Thu Jul 12 18:58:00 2007
+++ php-src/ext/date/tests/bug41523.phptMon Feb 25 22:32:59 2008
@@ -1,5 +1,7 @@
 --TEST--
-Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30)
+Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.1.2.3&r2=1.1.2.3.4.1&diff_format=u
Index: php-src/ext/date/tests/mktime-3.phpt
diff -u php-src/ext/date/tests/mktime-3.phpt:1.1.2.3 
php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.4.1
--- php-src/ext/date/tests/mktime-3.phpt:1.1.2.3Mon Dec  5 17:27:01 2005
+++ php-src/ext/date/tests/mktime-3.phptMon Feb 25 22:32:59 2008
@@ -1,5 +1,7 @@
 --TEST--
-mktime() [3]
+mktime() [3] (32-bit)
+--SKIPIF--
+
 --INI--
 error_reporting=2047
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime-mysql.phpt?r1=1.1.2.1&r2=1.1.2.1.2.1&diff_format=u
Index: php-src/ext/date/tests/strtotime-mysql.phpt
diff -u php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.1 
php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.1.2.1
--- php-src/ext/date/tests/strtotime-mysql.phpt:1.1.2.1 Fri Jun 16 22:46:57 2006
+++ php-src/ext/date/tests/strtotime-mysql.phpt Mon Feb 25 22:32:59 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() and mysql timestamps
+strtotime() and mysql timestamps (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime3.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/date/tests/strtotime3.phpt
diff -u php-src/ext/date/tests/strtotime3.phpt:1.1.2.2 
php-src/ext/date/tests/strtotime3.phpt:1.1.2.2.2.1
--- php-src/ext/date/tests/strtotime3.phpt:1.1.2.2  Sat Jun 17 10:30:23 2006
+++ php-src/ext/date/tests/strtotime3.phpt  Mon Feb 25 22:32:59 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() function
+strtotime() function (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001-64bit.phpt?view=markup&rev=1.1
Index: php-src/ext/wddx/tests/001-64bit.phpt
+++ php-src/ext/wddx/tests/001-64bit.phpt
--TEST--
wddx deserialization test (64-bit)
--SKIPIF--


--INI--
precision=14
--FILE--

--EXPECT--
array(11) {
  ["aNull"]=>
  NULL
  ["aString"]=>
  string(8) "a string"
  ["aNumber"]=>
  float(-12.456)
  ["aDateTime"]=>
  int(897625932)
  ["aDateTime2"]=>
  int(329632332)
  ["aDateTime3"]=>
  int(2223088332)
  ["aBoolean"]=>
  bool(true)
  ["anArray"]=>
  array(2) {
[0]=>
int(10)
[1]=>
string(14) "second element"
  }
  ["aBinary"]=>
  string(11) "binary data"
  ["anObject"]=>
  array(2) {
["s"]=>
string(8) "a string"
["n"]=>
float(-12.456)
  }
  ["aRecordset"]=>
  array(2) {
["NAME"]=>
array(2) {
  [0]=>
  string(8) "John Doe"
  [1]=>
  string(8) "Jane Doe"
}
["AGE"]=>
array(2) {
  [0]=>
  int(34)
  [1]=>
  int(31)
}
  }
}

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523-64bit.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug41523-64bit.phpt
+++ php-src/ext/date/tests/bug41523-64bit.phpt
--TEST--
Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30) (64 bit)
--SKIPIF--

--FILE--
format( DateTime::ISO8601 ), "\n";

?>
--EXPECT--
array(12) {
  ["year"]=>
  int(0)
  ["month"]=>
  int(0)
  ["day"]=>
  int(0)
  ["hour"]=>
  int(0)
  ["minute"]=>
  int(0)
  ["second"]=>
  int(0)
  ["fraction"]=>
  float(0)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localti

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests bug41523-64bit.phpt bug41523.phpt mktime-3-64bit.phpt mktime-3.phpt strtotime-mysql-64bit.phpt strtotime-mysql.phpt strtotime3-64bit.phpt s

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 22:32:26 2008 UTC

  Added files: 
/php-src/ext/wddx/tests 001-64bit.phpt 
/php-src/ext/date/tests bug41523-64bit.phpt mktime-3-64bit.phpt 
strtotime-mysql-64bit.phpt 
strtotime3-64bit.phpt 

  Modified files:  
/php-src/ext/wddx/tests 001.phpt 
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests bug41523.phpt mktime-3.phpt 
strtotime-mysql.phpt strtotime3.phpt 
  Log:
  - Fixed tests on 64bit platform.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001.phpt?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/wddx/tests/001.phpt
diff -u php-src/ext/wddx/tests/001.phpt:1.9 php-src/ext/wddx/tests/001.phpt:1.10
--- php-src/ext/wddx/tests/001.phpt:1.9 Fri May 18 11:29:40 2007
+++ php-src/ext/wddx/tests/001.phpt Mon Feb 25 22:32:25 2008
@@ -1,7 +1,8 @@
 --TEST--
-wddx unserialization test
+wddx unserialization test (32-bit)
 --SKIPIF--
 
+
 --INI--
 precision=14
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.166&r2=1.167&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.166 php-src/ext/date/php_date.c:1.167
--- php-src/ext/date/php_date.c:1.166   Sat Feb 23 17:03:53 2008
+++ php-src/ext/date/php_date.c Mon Feb 25 22:32:26 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.166 2008/02/23 17:03:53 helly Exp $ */
+/* $Id: php_date.c,v 1.167 2008/02/25 22:32:26 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1193,7 +1193,7 @@
 
ret = php_idate(format[0], ts, 0);
if (ret == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date 
format token.");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date 
format token");
RETURN_FALSE;
}
RETURN_LONG(ret);
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41523.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/date/tests/bug41523.phpt
diff -u php-src/ext/date/tests/bug41523.phpt:1.2 
php-src/ext/date/tests/bug41523.phpt:1.3
--- php-src/ext/date/tests/bug41523.phpt:1.2Fri Jul 13 15:22:34 2007
+++ php-src/ext/date/tests/bug41523.phptMon Feb 25 22:32:26 2008
@@ -1,5 +1,7 @@
 --TEST--
-Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30)
+Bug #41523 (strtotime('-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/date/tests/mktime-3.phpt
diff -u php-src/ext/date/tests/mktime-3.phpt:1.4 
php-src/ext/date/tests/mktime-3.phpt:1.5
--- php-src/ext/date/tests/mktime-3.phpt:1.4Mon Dec 19 12:57:49 2005
+++ php-src/ext/date/tests/mktime-3.phptMon Feb 25 22:32:26 2008
@@ -1,5 +1,7 @@
 --TEST--
-mktime() [3]
+mktime() [3] (32-bit)
+--SKIPIF--
+
 --INI--
 error_reporting=2047
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime-mysql.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/date/tests/strtotime-mysql.phpt
diff -u php-src/ext/date/tests/strtotime-mysql.phpt:1.3 
php-src/ext/date/tests/strtotime-mysql.phpt:1.4
--- php-src/ext/date/tests/strtotime-mysql.phpt:1.3 Sat Jun 17 12:48:20 2006
+++ php-src/ext/date/tests/strtotime-mysql.phpt Mon Feb 25 22:32:26 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() and mysql timestamps
+strtotime() and mysql timestamps (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime3.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/date/tests/strtotime3.phpt
diff -u php-src/ext/date/tests/strtotime3.phpt:1.4 
php-src/ext/date/tests/strtotime3.phpt:1.5
--- php-src/ext/date/tests/strtotime3.phpt:1.4  Sat Jun 17 12:48:20 2006
+++ php-src/ext/date/tests/strtotime3.phpt  Mon Feb 25 22:32:26 2008
@@ -1,5 +1,7 @@
 --TEST--
-strtotime() function
+strtotime() function (32 bit)
+--SKIPIF--
+
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/001-64bit.phpt?view=markup&rev=1.1
Index: php-src/ext/wddx/tests/001-64bit.phpt
+++ php-src/ext/wddx/tests/001-64bit.phpt
--TEST--
wddx deserialization test (64-bit)
--SKIPIF--


--INI--
precision=14
--FILE--

--EXPECT--
array(11) {
  ["aNull"]=>
  NULL
  ["aString"]=>
  string(8) "a string"
  ["aNumber"]=>
  float(-12.456)
  ["aDateTime"]=>
  int(897625932)
  ["aDateTime2"]=>
  int(329632332)
  ["aDateTime3"]=>
  int(2223088332)
  ["aBoolean"]=>
  bool(true)
  ["anArray"]=>
  array(2) {
[0]=>
int(10)
[1]=>
string(14) "second element"
  }
  ["aBinary"]=>
  string(11) "binary data"
  ["anObject"]=>
  array(2) {
["s"]=>
string(8) "a string"
["n"]=>
float(-12.456)
  }
  ["aRecordset"]=>
  array(2) {
["NAME"]=>
array(2) {
  [0]=>
  string(8) "John Doe"
  [1

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib parse_date.c parse_date.re

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 18:28:28 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - MFH: Fixed a problem with parsing timezones as part of a format.
  #- It doesn't actually fix anything, but atleast it's consistent with HEAD.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.15&r2=1.29.2.30.2.16&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.15 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.16
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.15Sat Jan 26 16:26:33 2008
+++ php-src/ext/date/lib/parse_date.c   Mon Feb 25 18:28:03 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sat Jan 26 16:10:48 2008 */
+/* Generated by re2c 0.12.1 on Mon Feb 25 19:27:05 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.15 2008/01/26 16:26:33 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.16 2008/02/25 18:28:03 derick Exp $ */
 
 #include "timelib.h"
 
@@ -669,7 +669,7 @@
long  value = 0;
const timelib_tz_lookup_table *tp;
 
-   while (**ptr != '\0' && **ptr != ')') {
+   while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12&r2=1.26.2.27.2.13&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.13
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12   Thu Jul 12 18:58:00 2007
+++ php-src/ext/date/lib/parse_date.re  Mon Feb 25 18:28:18 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12 2007/07/12 18:58:00 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.13 2008/02/25 18:28:18 derick Exp $ */
 
 #include "timelib.h"
 
@@ -667,7 +667,7 @@
long  value = 0;
const timelib_tz_lookup_table *tp;
 
-   while (**ptr != '\0' && **ptr != ')') {
+   while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 18:26:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - MFH: Added a few new separation specifiers.
  - MFH: Added specifiers that can reset or default the y/m/d/h/i/s/tz values.
  - MFH: Fixed a problem with parsing timezones as part of a format.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.8&r2=1.29.2.30.2.14.2.9&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.8 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.9
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.8Sun Feb 17 
18:17:28 2008
+++ php-src/ext/date/lib/parse_date.c   Mon Feb 25 18:26:16 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sun Feb 17 19:15:32 2008 */
+/* Generated by re2c 0.12.1 on Sun Feb 24 19:24:27 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.8 2008/02/17 18:17:28 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.9 2008/02/25 18:26:16 derick Exp $ */
 
 #include "timelib.h"
 
@@ -728,7 +728,7 @@
long  value = 0;
const timelib_tz_lookup_table *tp;
 
-   while (**ptr != '\0' && **ptr != ')') {
+   while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
@@ -23095,6 +23095,39 @@
}
break;
 
+   case ';':
+   case ':':
+   case '/':
+   case '.':
+   case ',':
+   case '-':
+   if (*ptr == *fptr) {
+   ++ptr;
+   } else {
+   add_pbf_error(s, "The separation symbol 
could not be found", string, begin);
+   }
+   break;
+
+   case '!': // reset all fields to default
+   s->time->y = 1970;
+   s->time->m = 1;
+   s->time->d = 1;
+   s->time->h = s->time->i = s->time->s = 0;
+   s->time->f = 0.0;
+   s->time->tz_info = NULL;
+   break; // break intentionally not missing
+
+   case '|': // reset all fields to default when not set
+   if (s->time->y == TIMELIB_UNSET ) s->time->y = 
1970;
+   if (s->time->m == TIMELIB_UNSET ) s->time->m = 
1;
+   if (s->time->d == TIMELIB_UNSET ) s->time->d = 
1;
+   if (s->time->h == TIMELIB_UNSET ) s->time->h = 
0;
+   if (s->time->i == TIMELIB_UNSET ) s->time->i = 
0;
+   if (s->time->s == TIMELIB_UNSET ) s->time->s = 
0;
+   if (s->time->f == TIMELIB_UNSET ) s->time->f = 
0.0;
+   
+   break; // break intentionally not missing
+
case '?': // random char
++ptr;
break;
@@ -23118,6 +23151,20 @@
add_pbf_error(s, "Data missing", string, ptr);
}
 
+   // clean up a bit
+   if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || 
s->time->s != TIMELIB_UNSET) {
+   if (s->time->h == TIMELIB_UNSET ) {
+   s->time->h = 0;
+   }
+   if (s->time->i == TIMELIB_UNSET ) {
+   s->time->i = 0;
+   }
+   if (s->time->s == TIMELIB_UNSET ) {
+   s->time->s = 0;
+   }
+   }
+
+
if (errors) {
*errors = in.errors;
} else {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.7&r2=1.26.2.27.2.12.2.8&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.7 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.8
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.7   Sun Feb 17 
18:17:45 2008
+++ php-src/ext/date/lib/parse_date.re  Mon Feb 25 18:26:33 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12.2.7 2008/02/17 18:17:45 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.12.2.8 2008/02/25 18:26:33 derick Exp $ */
 
 #include "timelib.h"
 
@@ -726,7 +726,7 @@
 

[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re

2008-02-25 Thread Derick Rethans
derick  Mon Feb 25 18:25:01 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - Added a few new separation specifiers.
  - Added specifiers that can reset or default the y/m/d/h/i/s/tz values.
  - Fixed a problem with parsing timezones as part of a format.
  #- [DOC]: Added format specifiers.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.81&r2=1.82&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.81 
php-src/ext/date/lib/parse_date.c:1.82
--- php-src/ext/date/lib/parse_date.c:1.81  Sun Feb 17 18:17:00 2008
+++ php-src/ext/date/lib/parse_date.c   Mon Feb 25 18:25:00 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sun Feb 17 19:16:04 2008 */
+/* Generated by re2c 0.12.1 on Mon Feb 25 19:12:37 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.81 2008/02/17 18:17:00 derick Exp $ */
+/* $Id: parse_date.c,v 1.82 2008/02/25 18:25:00 derick Exp $ */
 
 #include "timelib.h"
 
@@ -728,7 +728,7 @@
long  value = 0;
const timelib_tz_lookup_table *tp;
 
-   while (**ptr != '\0' && **ptr != ')') {
+   while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {
++*ptr;
}
end = *ptr;
@@ -23095,6 +23095,39 @@
}
break;
 
+   case ';':
+   case ':':
+   case '/':
+   case '.':
+   case ',':
+   case '-':
+   if (*ptr == *fptr) {
+   ++ptr;
+   } else {
+   add_pbf_error(s, "The separation symbol 
could not be found", string, begin);
+   }
+   break;
+
+   case '!': // reset all fields to default
+   s->time->y = 1970;
+   s->time->m = 1;
+   s->time->d = 1;
+   s->time->h = s->time->i = s->time->s = 0;
+   s->time->f = 0.0;
+   s->time->tz_info = NULL;
+   break; // break intentionally not missing
+
+   case '|': // reset all fields to default when not set
+   if (s->time->y == TIMELIB_UNSET ) s->time->y = 
1970;
+   if (s->time->m == TIMELIB_UNSET ) s->time->m = 
1;
+   if (s->time->d == TIMELIB_UNSET ) s->time->d = 
1;
+   if (s->time->h == TIMELIB_UNSET ) s->time->h = 
0;
+   if (s->time->i == TIMELIB_UNSET ) s->time->i = 
0;
+   if (s->time->s == TIMELIB_UNSET ) s->time->s = 
0;
+   if (s->time->f == TIMELIB_UNSET ) s->time->f = 
0.0;
+   
+   break; // break intentionally not missing
+
case '?': // random char
++ptr;
break;
@@ -23118,6 +23151,20 @@
add_pbf_error(s, "Data missing", string, ptr);
}
 
+   // clean up a bit
+   if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || 
s->time->s != TIMELIB_UNSET) {
+   if (s->time->h == TIMELIB_UNSET ) {
+   s->time->h = 0;
+   }
+   if (s->time->i == TIMELIB_UNSET ) {
+   s->time->i = 0;
+   }
+   if (s->time->s == TIMELIB_UNSET ) {
+   s->time->s = 0;
+   }
+   }
+
+
if (errors) {
*errors = in.errors;
} else {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.72&r2=1.73&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.72 
php-src/ext/date/lib/parse_date.re:1.73
--- php-src/ext/date/lib/parse_date.re:1.72 Sun Feb 17 18:17:01 2008
+++ php-src/ext/date/lib/parse_date.re  Mon Feb 25 18:25:01 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.72 2008/02/17 18:17:01 derick Exp $ */
+/* $Id: parse_date.re,v 1.73 2008/02/25 18:25:01 derick Exp $ */
 
 #include "timelib.h"
 
@@ -726,7 +726,7 @@
long  value = 0;
const timelib_tz_lookup_table *tp;
 
-   while (**ptr != '\0' && **ptr != ')') {
+   while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') {

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date/lib dow.c

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 17:49:30 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/date/lib   dow.c 
  Log:
  - MFH: Fixed bug #44216 (strftime segfaults on large negative value).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1093&r2=1.2027.2.547.2.1094&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1093 php-src/NEWS:1.2027.2.547.2.1094
--- php-src/NEWS:1.2027.2.547.2.1093Fri Feb 22 09:48:18 2008
+++ php-src/NEWSFri Feb 22 17:49:30 2008
@@ -11,6 +11,7 @@
 - Upgraded PCRE to version 7.6 (Nuno)
 
 
+- Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
 - Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit
   platforms). (Derick)
 - Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.8.2.3.2.4&r2=1.8.2.3.2.5&diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.8.2.3.2.4 
php-src/ext/date/lib/dow.c:1.8.2.3.2.5
--- php-src/ext/date/lib/dow.c:1.8.2.3.2.4  Mon Dec 31 07:20:05 2007
+++ php-src/ext/date/lib/dow.c  Fri Feb 22 17:49:30 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dow.c,v 1.8.2.3.2.4 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: dow.c,v 1.8.2.3.2.5 2008/02/22 17:49:30 derick Exp $ */
 
 #include "timelib.h"
 
@@ -35,10 +35,12 @@
 {
timelib_sll c1, y1, m1, dow;
 
-   /* Only valid for Gregorian calendar */
+   /* Only valid for Gregorian calendar, commented out as we don't handle
+* julian calendar. We just return the 'wrong' day of week to be
+* consistent.
if (y < 1753) {
return -1;
-   }
+   } */
c1 = century_value(y / 100);
y1 = (y % 100);
m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m];

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib dow.c

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 17:48:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   dow.c 
  Log:
  - MFH: Fixed bug #44216 (strftime segfaults on large negative value).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.8.2.3.2.3.2.1&r2=1.8.2.3.2.3.2.2&diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.1 
php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.2
--- php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.1  Mon Dec 31 07:17:07 2007
+++ php-src/ext/date/lib/dow.c  Fri Feb 22 17:48:46 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dow.c,v 1.8.2.3.2.3.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: dow.c,v 1.8.2.3.2.3.2.2 2008/02/22 17:48:46 derick Exp $ */
 
 #include "timelib.h"
 
@@ -35,10 +35,12 @@
 {
timelib_sll c1, y1, m1, dow;
 
-   /* Only valid for Gregorian calendar */
+   /* Only valid for Gregorian calendar, commented out as we don't handle
+* julian calendar. We just return the 'wrong' day of week to be
+* consistent.
if (y < 1753) {
return -1;
-   }
+   } */
c1 = century_value(y / 100);
y1 = (y % 100);
m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m];

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib dow.c

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 17:48:31 2008 UTC

  Modified files:  
/php-src/ext/date/lib   dow.c 
  Log:
  - Fixed bug #44216 (strftime segfaults on large negative value).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.13 php-src/ext/date/lib/dow.c:1.14
--- php-src/ext/date/lib/dow.c:1.13 Mon Dec 31 07:12:08 2007
+++ php-src/ext/date/lib/dow.c  Fri Feb 22 17:48:31 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dow.c,v 1.13 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: dow.c,v 1.14 2008/02/22 17:48:31 derick Exp $ */
 
 #include "timelib.h"
 
@@ -35,10 +35,12 @@
 {
timelib_sll c1, y1, m1, dow;
 
-   /* Only valid for Gregorian calendar */
+   /* Only valid for Gregorian calendar, commented out as we don't handle
+* julian calendar. We just return the 'wrong' day of week to be
+* consistent.
if (y < 1753) {
return -1;
-   }
+   } */
c1 = century_value(y / 100);
y1 = (y % 100);
m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m];

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date/lib timelib.h

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 09:48:18 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date/lib   timelib.h 
/php-srcNEWS 
  Log:
  - MFH: Fixed bug #44209: strtotime doesn't support 64 bit timestamps.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.10.2.11.2.4&r2=1.10.2.11.2.5&diff_format=u
Index: php-src/ext/date/lib/timelib.h
diff -u php-src/ext/date/lib/timelib.h:1.10.2.11.2.4 
php-src/ext/date/lib/timelib.h:1.10.2.11.2.5
--- php-src/ext/date/lib/timelib.h:1.10.2.11.2.4Mon Dec 31 07:20:05 2007
+++ php-src/ext/date/lib/timelib.h  Fri Feb 22 09:48:18 2008
@@ -16,12 +16,15 @@
+--+
  */
 
-/* $Id: timelib.h,v 1.10.2.11.2.4 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: timelib.h,v 1.10.2.11.2.5 2008/02/22 09:48:18 derick Exp $ */
 
 #ifndef __TIMELIB_H__
 #define __TIMELIB_H__
 
 #include "timelib_structs.h"
+#if HAVE_LIMITS_H
+#include 
+#endif
 
 #define TIMELIB_NONE 0x00
 #define TIMELIB_OVERRIDE_TIME0x01
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1092&r2=1.2027.2.547.2.1093&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1092 php-src/NEWS:1.2027.2.547.2.1093
--- php-src/NEWS:1.2027.2.547.2.1092Thu Feb 21 15:14:12 2008
+++ php-src/NEWSFri Feb 22 09:48:18 2008
@@ -11,6 +11,8 @@
 - Upgraded PCRE to version 7.6 (Nuno)
 
 
+- Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit
+  platforms). (Derick)
 - Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
 - Fixed bug #44191 (preg_grep messes up array index). (Felipe)
 - Fixed bug #44189 (PDO setAttribute() does not properly validate values for 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib timelib.h

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 09:47:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   timelib.h 
  Log:
  - MFH: Fixed bug #44209: strtotime doesn't support 64 bit timestamps.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.10.2.11.2.3.2.2&r2=1.10.2.11.2.3.2.3&diff_format=u
Index: php-src/ext/date/lib/timelib.h
diff -u php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.2 
php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.3
--- php-src/ext/date/lib/timelib.h:1.10.2.11.2.3.2.2Sun Jan 13 15:16:02 2008
+++ php-src/ext/date/lib/timelib.h  Fri Feb 22 09:47:19 2008
@@ -16,12 +16,15 @@
+--+
  */
 
-/* $Id: timelib.h,v 1.10.2.11.2.3.2.2 2008/01/13 15:16:02 derick Exp $ */
+/* $Id: timelib.h,v 1.10.2.11.2.3.2.3 2008/02/22 09:47:19 derick Exp $ */
 
 #ifndef __TIMELIB_H__
 #define __TIMELIB_H__
 
 #include "timelib_structs.h"
+#if HAVE_LIMITS_H
+#include 
+#endif
 
 #define TIMELIB_NONE 0x00
 #define TIMELIB_OVERRIDE_TIME0x01

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib timelib.h

2008-02-22 Thread Derick Rethans
derick  Fri Feb 22 09:47:10 2008 UTC

  Modified files:  
/php-src/ext/date/lib   timelib.h 
  Log:
  - Fixed bug #44209: strtotime doesn't support 64 bit timestamps.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.h?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/date/lib/timelib.h
diff -u php-src/ext/date/lib/timelib.h:1.26 php-src/ext/date/lib/timelib.h:1.27
--- php-src/ext/date/lib/timelib.h:1.26 Sun Jan 13 15:16:48 2008
+++ php-src/ext/date/lib/timelib.h  Fri Feb 22 09:47:10 2008
@@ -16,12 +16,15 @@
+--+
  */
 
-/* $Id: timelib.h,v 1.26 2008/01/13 15:16:48 derick Exp $ */
+/* $Id: timelib.h,v 1.27 2008/02/22 09:47:10 derick Exp $ */
 
 #ifndef __TIMELIB_H__
 #define __TIMELIB_H__
 
 #include "timelib_structs.h"
+#if HAVE_LIMITS_H
+#include 
+#endif
 
 #define TIMELIB_NONE 0x00
 #define TIMELIB_OVERRIDE_TIME0x01

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re

2008-02-17 Thread Derick Rethans
derick  Sun Feb 17 18:17:56 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - MFH: fixed typoes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.7&r2=1.29.2.30.2.14.2.8&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.7 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.8
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.7Sun Feb  3 
14:14:49 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Feb 17 18:17:28 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sun Feb  3 15:10:59 2008 */
+/* Generated by re2c 0.12.1 on Sun Feb 17 19:15:32 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.7 2008/02/03 14:14:49 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.8 2008/02/17 18:17:28 derick Exp $ */
 
 #include "timelib.h"
 
@@ -620,7 +620,7 @@
}
 }
 
-static void timelib_eat_until_seperator(char **ptr)
+static void timelib_eat_until_separator(char **ptr)
 {
while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) {
++*ptr;
@@ -23036,7 +23036,7 @@
if (s->time->h == TIMELIB_UNSET) {
add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
} else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
-   add_pbf_error(s, "A meridian could no 
tbe found", string, begin);
+   add_pbf_error(s, "A meridian could not 
be found", string, begin);
} else {
s->time->h += tmp;
}
@@ -23091,7 +23091,7 @@
if (*ptr == ';' || *ptr == ':' || *ptr == '/' 
|| *ptr == '.' || *ptr == ',' || *ptr == '-') {
++ptr;
} else {
-   add_pbf_error(s, "The seperation symbol 
([;:/.,-]) could not be found", string, begin);
+   add_pbf_error(s, "The separation symbol 
([;:/.,-]) could not be found", string, begin);
}
break;
 
@@ -23099,13 +23099,13 @@
++ptr;
break;
 
-   case '*': // random chars until a seperator or number 
([ \t.,:;/-0123456789])
-   timelib_eat_until_seperator((char **) &ptr);
+   case '*': // random chars until a separator or number 
([ \t.,:;/-0123456789])
+   timelib_eat_until_separator((char **) &ptr);
break;
 
default:
if (*fptr != *ptr) {
-   add_pbf_error(s, "The format seperator 
does not match", string, begin);
+   add_pbf_error(s, "The format separator 
does not match", string, begin);
}
ptr++;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.6&r2=1.26.2.27.2.12.2.7&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.6 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.7
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.6   Sun Feb  3 
14:15:07 2008
+++ php-src/ext/date/lib/parse_date.re  Sun Feb 17 18:17:45 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12.2.6 2008/02/03 14:15:07 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.12.2.7 2008/02/17 18:17:45 derick Exp $ */
 
 #include "timelib.h"
 
@@ -618,7 +618,7 @@
}
 }
 
-static void timelib_eat_until_seperator(char **ptr)
+static void timelib_eat_until_separator(char **ptr)
 {
while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) {
++*ptr;
@@ -1808,7 +1808,7 @@
if (s->time->h == TIMELIB_UNSET) {
add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
} else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
-   add_pbf_error(s, "A meridian could no 
tbe found", string, begin);
+   

[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re

2008-02-17 Thread Derick Rethans
derick  Sun Feb 17 18:17:01 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - Fixed typoes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.80&r2=1.81&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.80 
php-src/ext/date/lib/parse_date.c:1.81
--- php-src/ext/date/lib/parse_date.c:1.80  Sun Feb  3 14:10:46 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Feb 17 18:17:00 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sun Feb  3 15:07:12 2008 */
+/* Generated by re2c 0.12.1 on Sun Feb 17 19:16:04 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.80 2008/02/03 14:10:46 derick Exp $ */
+/* $Id: parse_date.c,v 1.81 2008/02/17 18:17:00 derick Exp $ */
 
 #include "timelib.h"
 
@@ -620,7 +620,7 @@
}
 }
 
-static void timelib_eat_until_seperator(char **ptr)
+static void timelib_eat_until_separator(char **ptr)
 {
while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) {
++*ptr;
@@ -23036,7 +23036,7 @@
if (s->time->h == TIMELIB_UNSET) {
add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
} else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
-   add_pbf_error(s, "A meridian could no 
tbe found", string, begin);
+   add_pbf_error(s, "A meridian could not 
be found", string, begin);
} else {
s->time->h += tmp;
}
@@ -23091,7 +23091,7 @@
if (*ptr == ';' || *ptr == ':' || *ptr == '/' 
|| *ptr == '.' || *ptr == ',' || *ptr == '-') {
++ptr;
} else {
-   add_pbf_error(s, "The seperation symbol 
([;:/.,-]) could not be found", string, begin);
+   add_pbf_error(s, "The separation symbol 
([;:/.,-]) could not be found", string, begin);
}
break;
 
@@ -23099,13 +23099,13 @@
++ptr;
break;
 
-   case '*': // random chars until a seperator or number 
([ \t.,:;/-0123456789])
-   timelib_eat_until_seperator((char **) &ptr);
+   case '*': // random chars until a separator or number 
([ \t.,:;/-0123456789])
+   timelib_eat_until_separator((char **) &ptr);
break;
 
default:
if (*fptr != *ptr) {
-   add_pbf_error(s, "The format seperator 
does not match", string, begin);
+   add_pbf_error(s, "The format separator 
does not match", string, begin);
}
ptr++;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.71&r2=1.72&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.71 
php-src/ext/date/lib/parse_date.re:1.72
--- php-src/ext/date/lib/parse_date.re:1.71 Sun Feb  3 14:10:48 2008
+++ php-src/ext/date/lib/parse_date.re  Sun Feb 17 18:17:01 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.71 2008/02/03 14:10:48 derick Exp $ */
+/* $Id: parse_date.re,v 1.72 2008/02/17 18:17:01 derick Exp $ */
 
 #include "timelib.h"
 
@@ -618,7 +618,7 @@
}
 }
 
-static void timelib_eat_until_seperator(char **ptr)
+static void timelib_eat_until_separator(char **ptr)
 {
while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) {
++*ptr;
@@ -1808,7 +1808,7 @@
if (s->time->h == TIMELIB_UNSET) {
add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
} else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
-   add_pbf_error(s, "A meridian could no 
tbe found", string, begin);
+   add_pbf_error(s, "A meridian could not 
be found", string, begin);
} else {
s->time->h += tmp;
}

Re: [PHP-CVS] cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c

2008-02-16 Thread Derick Rethans
On Sat, 16 Feb 2008, Rui Hirokawa wrote:

> hirokawa  Sat Feb 16 08:50:08 2008 UTC
> 
>   Modified files:  (Branch: PHP_4_4)
> /php-src/ext/mbstring mbstring.c 
>   Log:
>   MFB

Rui, PHP 4 is no longer supported. In order to use it *just* for 
security fixes, it is probably a good idea not to have normal commits in 
this branch *at all*. Could you please revert your last two commits?

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt reflectionProperty_setAccessible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:48:13 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests   reflectionProperty_setAccessible.phpt 

  Removed files:   
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/reflection php_reflection.c 
  Log:
  - Fixed speling.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.112&r2=1.2027.2.547.2.965.2.113&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.112 
php-src/NEWS:1.2027.2.547.2.965.2.113
--- php-src/NEWS:1.2027.2.547.2.965.2.112   Fri Feb 15 12:38:52 2008
+++ php-src/NEWSFri Feb 15 12:48:13 2008
@@ -40,7 +40,7 @@
   . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
   . Added FilesystemIterator. (Marcus)
   . Added GlobIterator. (Marcus)
-- Add the ReflectionProperty::setAccesible() method that allows non-public
+- Add the ReflectionProperty::setAccessible() method that allows non-public
   property's values to be read through ::getValue().
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.12&r2=1.164.2.33.2.45.2.13&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.13
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12Fri Feb 
15 12:38:53 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:48:13 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.13 2008/02/15 12:48:13 derick Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -4119,9 +4119,9 @@
 }
 /* }}} */
 
-/* {{{ proto public int ReflectionProperty::setAccesible()
+/* {{{ proto public int ReflectionProperty::setAccessible()
Sets whether non-public properties can be requested */
-ZEND_METHOD(reflection_property, setAccesible)
+ZEND_METHOD(reflection_property, setAccessible)
 {
reflection_object *intern;
property_reference *ref;
@@ -4744,7 +4744,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccessible, 0)
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
@@ -4764,7 +4764,7 @@
ZEND_ME(reflection_property, getModifiers, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
-   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
+   ZEND_ME(reflection_property, setAccessible, 
arginfo_reflection_property_setAccessible, 0)
{NULL, NULL, NULL}
 };
 
@@ -4943,7 +4943,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.13 2008/02/15 12:48:13 derick Exp $");
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
--TEST--
Test ReflectionProperty::setAccessible().
--SKIPIF--

--FILE--
getValue($instance));
}
catch(Exception $exc) {
echo $exc->getMessage(), "\n";
}

$propInfo->setAccessible(true);
var_dump($propInfo->getValue($instance));

$propInfo->setAccessible(false);
try {
var_dump($propInfo->getValue($instance));
}
catch(Exception $exc) {
echo $exc->getMessage(), "\n";
}
?>
--EXPECTF--

Protected property:
Cannot access non-public member TestClass::prot
int(4)
Cannot access non-public member TestClass::prot

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt reflectionProperty_setAccessible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:47:21 2008 UTC

  Added files: 
/php-src/ext/reflection/tests   reflectionProperty_setAccessible.phpt 

  Removed files:   
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Fixed typo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.293&r2=1.294&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.293 
php-src/ext/reflection/php_reflection.c:1.294
--- php-src/ext/reflection/php_reflection.c:1.293   Fri Feb 15 12:37:37 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:47:21 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.293 2008/02/15 12:37:37 derick Exp $ */
+/* $Id: php_reflection.c,v 1.294 2008/02/15 12:47:21 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -4229,9 +4229,9 @@
 }
 /* }}} */
 
-/* {{{ proto public int ReflectionProperty::setAccesible() U
+/* {{{ proto public int ReflectionProperty::setAccessible() U
Sets whether non-public properties can be requested */
-ZEND_METHOD(reflection_property, setAccesible)
+ZEND_METHOD(reflection_property, setAccessible)
 {
reflection_object *intern;
property_reference *ref;
@@ -4859,7 +4859,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccessible, 0)
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
@@ -4880,7 +4880,7 @@
ZEND_ME(reflection_property, getDefaultValue, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
-   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
+   ZEND_ME(reflection_property, setAccessible, 
arginfo_reflection_property_setAccessible, 0)
{NULL, NULL, NULL}
 };
 
@@ -5059,7 +5059,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.293 
2008/02/15 12:37:37 derick Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.294 
2008/02/15 12:47:21 derick Exp $");
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccessible.phpt
--TEST--
Test ReflectionProperty::setAccessible().
--SKIPIF--

--FILE--
getValue($instance));
}
catch(Exception $exc) {
echo $exc->getMessage(), "\n";
}

$propInfo->setAccessible(true);
var_dump($propInfo->getValue($instance));

$propInfo->setAccessible(false);
try {
var_dump($propInfo->getValue($instance));
}
catch(Exception $exc) {
echo $exc->getMessage(), "\n";
}
?>
--EXPECTF--

Protected property:
Cannot access non-public member TestClass::prot
int(4)
Cannot access non-public member TestClass::prot

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:38:53 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/reflection php_reflection.c 
  Log:
  - Add the ReflectionProperty::setAccesible() method that allows non-public
property's values to be read through ::getValue().
  #- [DOC]
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.111&r2=1.2027.2.547.2.965.2.112&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.111 
php-src/NEWS:1.2027.2.547.2.965.2.112
--- php-src/NEWS:1.2027.2.547.2.965.2.111   Tue Feb 12 09:27:45 2008
+++ php-src/NEWSFri Feb 15 12:38:52 2008
@@ -40,6 +40,8 @@
   . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
   . Added FilesystemIterator. (Marcus)
   . Added GlobIterator. (Marcus)
+- Add the ReflectionProperty::setAccesible() method that allows non-public
+  property's values to be read through ::getValue().
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
 - Added stream_supports_lock() function. (Benjamin Schulz)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.11&r2=1.164.2.33.2.45.2.12&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.11 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.12
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.11Wed Jan 
30 14:45:20 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:38:53 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.11 2008/01/30 14:45:20 felipe Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.12 2008/02/15 12:38:53 derick Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -180,6 +180,7 @@
 typedef struct _property_reference {
zend_class_entry *ce;
zend_property_info prop;
+   unsigned int ignore_visibility:1;
 } property_reference;
 
 /* Struct for parameters */
@@ -1176,6 +1177,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference->ce = ce;
reference->prop = *prop;
+   reference->ignore_visibility = 0;
intern->ptr = reference;
intern->free_ptr = 1;
intern->ce = ce;
@@ -3856,6 +3858,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference->ce = ce;
reference->prop = *property_info;
+   reference->ignore_visibility = 0;
intern->ptr = reference;
intern->free_ptr = 1;
intern->ce = ce;
@@ -3963,7 +3966,7 @@
METHOD_NOTSTATIC(reflection_property_ptr);
GET_REFLECTION_OBJECT_PTR(ref);
 
-   if (!(ref->prop.flags & ZEND_ACC_PUBLIC)) {
+   if (!(ref->prop.flags & ZEND_ACC_PUBLIC) && ref->ignore_visibility == 
0) {
_default_get_entry(getThis(), "name", sizeof("name"), &name 
TSRMLS_CC);
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
"Cannot access non-public member %s::%s", 
intern->ce->name, Z_STRVAL(name));
@@ -3981,10 +3984,13 @@
zval_copy_ctor(return_value);
INIT_PZVAL(return_value);
} else {
+   char *class_name, *prop_name;
+   
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", 
&object) == FAILURE) {
return;
}
-   member_p = zend_read_property(Z_OBJCE_P(object), object, 
ref->prop.name, ref->prop.name_length, 1 TSRMLS_CC);
+   zend_unmangle_property_name(ref->prop.name, 
ref->prop.name_length, &class_name, &prop_name);
+   member_p = zend_read_property(Z_OBJCE_P(object), object, 
prop_name, strlen(prop_name), 1 TSRMLS_CC);
*return_value= *member_p;
zval_copy_ctor(return_value);
INIT_PZVAL(return_value);
@@ -4113,6 +4119,24 @@
 }
 /* }}} */
 
+/* {{{ proto public int ReflectionProperty::setAccesible()
+   Sets whether non-public properties can be requested */
+ZEND_METHOD(reflection_property, setAccesible)
+{
+   reflection_object *intern;
+   property_reference *ref;
+   zend_bool visible;
+
+   METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 1);
+   GET_REFLECTION_OBJECT_PTR(ref);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &visible) == 
FAILURE) {
+   return;
+   }
+   ref->ignore_visibility = visible;
+}
+/* }}} */
+
 /* {{{ proto public static mixed ReflectionExtension::export(string name [, 
bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for 
return, printing i

[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt

2008-02-15 Thread Derick Rethans
derick  Fri Feb 15 12:37:38 2008 UTC

  Added files: 
/php-src/ext/reflection/tests   reflectionProperty_setAccesible.phpt 

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  - Add the ReflectionProperty::setAccesible() method that allows non-public
property's values to be read through ::getValue().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.292&r2=1.293&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.292 
php-src/ext/reflection/php_reflection.c:1.293
--- php-src/ext/reflection/php_reflection.c:1.292   Wed Jan 30 12:50:49 2008
+++ php-src/ext/reflection/php_reflection.c Fri Feb 15 12:37:37 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.292 2008/01/30 12:50:49 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.293 2008/02/15 12:37:37 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -175,6 +175,7 @@
 typedef struct _property_reference {
zend_class_entry *ce;
zend_property_info prop;
+   unsigned int ignore_visibility:1;
 } property_reference;
 
 /* Struct for parameters */
@@ -1196,6 +1197,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference->ce = ce;
reference->prop = *prop;
+   reference->ignore_visibility = 0;
intern->ptr = reference;
intern->free_ptr = 1;
intern->ce = ce;
@@ -3939,6 +3941,7 @@
reference = (property_reference*) emalloc(sizeof(property_reference));
reference->ce = ce;
reference->prop = *property_info;
+   reference->ignore_visibility = 0;
intern->ptr = reference;
intern->free_ptr = 1;
intern->ce = ce;
@@ -4078,7 +4081,7 @@
METHOD_NOTSTATIC(reflection_property_ptr);
GET_REFLECTION_OBJECT_PTR(ref);
 
-   if (!(ref->prop.flags & ZEND_ACC_PUBLIC)) {
+   if (!(ref->prop.flags & ZEND_ACC_PUBLIC) && ref->ignore_visibility == 
0) {
_default_get_entry(getThis(), "name", sizeof("name"), &name 
TSRMLS_CC);
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
"Cannot access non-public member %v::%v", 
intern->ce->name, Z_UNIVAL(name));
@@ -4226,6 +4229,24 @@
 }
 /* }}} */
 
+/* {{{ proto public int ReflectionProperty::setAccesible() U
+   Sets whether non-public properties can be requested */
+ZEND_METHOD(reflection_property, setAccesible)
+{
+   reflection_object *intern;
+   property_reference *ref;
+   zend_bool visible;
+
+   METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 1);
+   GET_REFLECTION_OBJECT_PTR(ref);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &visible) == 
FAILURE) {
+   return;
+   }
+   ref->ignore_visibility = visible;
+}
+/* }}} */
+
 /* {{{ proto public static mixed ReflectionExtension::export(string name [, 
bool return]) throws ReflectionException U
Exports a reflection object. Returns the output if TRUE is specified for 
return, printing it otherwise. */
 ZEND_METHOD(reflection_extension, export)
@@ -4837,6 +4858,11 @@
ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO()
 
+static
+ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccesible, 0)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
 static const zend_function_entry reflection_property_functions[] = {
ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_property, export, 
arginfo_reflection_property_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
@@ -4854,6 +4880,7 @@
ZEND_ME(reflection_property, getDefaultValue, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
ZEND_ME(reflection_property, getDocComment, NULL, 0)
+   ZEND_ME(reflection_property, setAccesible, 
arginfo_reflection_property_setAccesible, 0)
{NULL, NULL, NULL}
 };
 
@@ -5032,7 +5059,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.292 
2008/01/30 12:50:49 tony2001 Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.293 
2008/02/15 12:37:37 derick Exp $");
 
php_info_print_table_end();
 } /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt
+++ php-src/ext/reflection/tests/reflectionProperty_setAccesible.phpt
--TEST--
Test ReflectionProperty::setAccesible().
--SKIPIF--

--FILE--
getValue($instance));
}
catch(Exception $exc) {
echo $exc->getMessage(), "\n";
}

$propInfo->setAccesible(true);
var_dump($propInfo->getValue($instance));

$propInf

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-02-13 Thread Derick Rethans
derick  Wed Feb 13 21:53:12 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Add some missing elements from the return value.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.18&r2=1.43.2.45.2.51.2.19&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.18 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.19
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.18 Sat Feb  2 17:25:54 2008
+++ php-src/ext/date/php_date.c Wed Feb 13 21:53:12 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.18 2008/02/02 17:25:54 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.19 2008/02/13 21:53:12 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1973,7 +1973,7 @@
break;
}
}
-   if (parsed_time->have_relative || parsed_time->have_weekday_relative) {
+   if (parsed_time->have_relative || parsed_time->have_weekday_relative || 
parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
MAKE_STD_ZVAL(element);
array_init(element);
}
@@ -1988,7 +1988,13 @@
if (parsed_time->have_weekday_relative) {
add_assoc_long(element, "weekday", 
parsed_time->relative.weekday);
}
-   if (parsed_time->have_relative || parsed_time->have_weekday_relative) {
+   if (parsed_time->have_special_relative && (parsed_time->special.type == 
TIMELIB_SPECIAL_WEEKDAY)) {
+   add_assoc_long(element, "weekdays", 
parsed_time->special.amount);
+   }
+   if (parsed_time->relative.first_last_day_of) {
+   add_assoc_bool(element, parsed_time->relative.first_last_day_of 
== 1 ? "first_day_of_month" : "last_day_of_month", 1);
+   }
+   if (parsed_time->have_relative || parsed_time->have_weekday_relative || 
parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
add_assoc_zval(return_value, "relative", element);
}
timelib_time_dtor(parsed_time);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-02-13 Thread Derick Rethans
derick  Wed Feb 13 21:53:01 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Add some missing elements from the return value.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.164&r2=1.165&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.164 php-src/ext/date/php_date.c:1.165
--- php-src/ext/date/php_date.c:1.164   Sat Feb  2 17:25:40 2008
+++ php-src/ext/date/php_date.c Wed Feb 13 21:53:01 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.164 2008/02/02 17:25:40 derick Exp $ */
+/* $Id: php_date.c,v 1.165 2008/02/13 21:53:01 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2098,7 +2098,7 @@
break;
}
}
-   if (parsed_time->have_relative || parsed_time->have_weekday_relative) {
+   if (parsed_time->have_relative || parsed_time->have_weekday_relative || 
parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
MAKE_STD_ZVAL(element);
array_init(element);
}
@@ -2113,7 +2113,13 @@
if (parsed_time->have_weekday_relative) {
add_ascii_assoc_long(element, "weekday", 
parsed_time->relative.weekday);
}
-   if (parsed_time->have_relative || parsed_time->have_weekday_relative) {
+   if (parsed_time->have_special_relative && (parsed_time->special.type == 
TIMELIB_SPECIAL_WEEKDAY)) {
+   add_ascii_assoc_long(element, "weekdays", 
parsed_time->special.amount);
+   }
+   if (parsed_time->relative.first_last_day_of) {
+   add_ascii_assoc_bool(element, 
parsed_time->relative.first_last_day_of == 1 ? "first_day_of_month" : 
"last_day_of_month", 1);
+   }
+   if (parsed_time->have_relative || parsed_time->have_weekday_relative || 
parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
add_ascii_assoc_zval(return_value, "relative", element);
}
timelib_time_dtor(parsed_time);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/tests bug43075.phpt bug43960.phpt oo_002.phpt

2008-02-03 Thread Derick Rethans
derick  Sun Feb  3 14:37:00 2008 UTC

  Modified files:  
/php-src/ext/date/tests bug43075.phpt bug43960.phpt oo_002.phpt 
  Log:
  - Sync tests.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43075.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/bug43075.phpt
diff -u php-src/ext/date/tests/bug43075.phpt:1.1 
php-src/ext/date/tests/bug43075.phpt:1.2
--- php-src/ext/date/tests/bug43075.phpt:1.1Thu Jan 17 20:43:58 2008
+++ php-src/ext/date/tests/bug43075.phptSun Feb  3 14:37:00 2008
@@ -1,5 +1,7 @@
 --TEST--
 Bug #43075 (Support 24 as hour)
+--INI--
+date.timezone=UTC
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43960.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/bug43960.phpt
diff -u php-src/ext/date/tests/bug43960.phpt:1.1 
php-src/ext/date/tests/bug43960.phpt:1.2
--- php-src/ext/date/tests/bug43960.phpt:1.1Tue Jan 29 20:08:42 2008
+++ php-src/ext/date/tests/bug43960.phptSun Feb  3 14:37:00 2008
@@ -1,5 +1,7 @@
 --TEST--
 Bug #43960 (strtotime() returns timestamp in the future when given a bogus 
string)
+--INI--
+date.timezone=UTC
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/oo_002.phpt?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/date/tests/oo_002.phpt
diff -u php-src/ext/date/tests/oo_002.phpt:1.8 
php-src/ext/date/tests/oo_002.phpt:1.9
--- php-src/ext/date/tests/oo_002.phpt:1.8  Tue Jan  1 14:35:26 2008
+++ php-src/ext/date/tests/oo_002.phpt  Sun Feb  3 14:37:00 2008
@@ -19,14 +19,14 @@
 $c = clone $t;
 var_dump($c->getName());
 ?>
---EXPECTF--
+--EXPECT--
 string(29) "Wed, 01 Aug 07 13:00:00 +"
 string(29) "Wed, 01 Aug 07 13:00:00 +"
 string(29) "Wed, 01 Aug 07 14:00:00 +"
 string(29) "Wed, 01 Aug 07 12:59:59 +"
 string(10) "Asia/Tokyo"
 string(10) "Asia/Tokyo"
---UEXPECTF--
+--UEXPECT--
 unicode(29) "Wed, 01 Aug 07 13:00:00 +"
 unicode(29) "Wed, 01 Aug 07 13:00:00 +"
 unicode(29) "Wed, 01 Aug 07 14:00:00 +"

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c

2008-02-03 Thread Derick Rethans
derick  Sun Feb  3 14:22:56 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date   php_date.c 
  Log:
  - Fixed invalid read errors as found by GCOV.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.55&r2=1.43.2.45.2.56&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.55 
php-src/ext/date/php_date.c:1.43.2.45.2.56
--- php-src/ext/date/php_date.c:1.43.2.45.2.55  Sat Feb  2 17:26:23 2008
+++ php-src/ext/date/php_date.c Sun Feb  3 14:22:55 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.55 2008/02/02 17:26:23 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.56 2008/02/03 14:22:55 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1684,7 +1684,7 @@
timelib_time   *now;
timelib_tzinfo *tzi;
timelib_error_container *err = NULL;
-   int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst;
+   int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst, errors_found = 0;
char *new_abbr;
timelib_sll new_offset;

@@ -1695,22 +1695,17 @@
timelib_time_dtor(dateobj->time);
}
dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", 
time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB);
-   if (err) {
-   if (ctor && err && err->error_count) {
+
+   if (err && err->error_count) {
+   if (ctor) {
/* spit out the first library error message, at least */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to 
parse time string (%s) at position %d (%c): %s", time_str,
-   
err->error_messages[0].position, err->error_messages[0].character, 
err->error_messages[0].message);
+   err->error_messages[0].position, 
err->error_messages[0].character, err->error_messages[0].message);
}
-   timelib_error_container_dtor(err);
-   }
-
-
-   if (ctor && err && err->error_count) {
-   /* spit out the first library error message, at least */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse 
time string (%s) at position %d (%c): %s", time_str,
-   err->error_messages[0].position, 
err->error_messages[0].character, err->error_messages[0].message);
+   errors_found = 1;
}
-   if (err && err->error_count) {
+   timelib_error_container_dtor(err);
+   if (errors_found) {
return 0;
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c

2008-02-02 Thread Derick Rethans
derick  Sat Feb  2 17:26:23 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Make timezone_open() work again.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.54&r2=1.43.2.45.2.55&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.54 
php-src/ext/date/php_date.c:1.43.2.45.2.55
--- php-src/ext/date/php_date.c:1.43.2.45.2.54  Sat Jan 26 16:26:33 2008
+++ php-src/ext/date/php_date.c Sat Feb  2 17:26:23 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.54 2008/01/26 16:26:33 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.55 2008/02/02 17:26:23 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2168,6 +2168,7 @@
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, 
return_value TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
+   tzobj->initialized = 1;
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-02-02 Thread Derick Rethans
derick  Sat Feb  2 17:25:54 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Make timezone_open() work again.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.17&r2=1.43.2.45.2.51.2.18&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.17 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.18
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.17 Tue Jan 29 20:12:53 2008
+++ php-src/ext/date/php_date.c Sat Feb  2 17:25:54 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.17 2008/01/29 20:12:53 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.18 2008/02/02 17:25:54 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2336,6 +2336,7 @@
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, 
return_value TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
+   tzobj->initialized = 1;
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-02-02 Thread Derick Rethans
derick  Sat Feb  2 17:25:40 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Make timezone_open() work again.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.163&r2=1.164&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.163 php-src/ext/date/php_date.c:1.164
--- php-src/ext/date/php_date.c:1.163   Tue Jan 29 20:12:23 2008
+++ php-src/ext/date/php_date.c Sat Feb  2 17:25:40 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.163 2008/01/29 20:12:23 derick Exp $ */
+/* $Id: php_date.c,v 1.164 2008/02/02 17:25:40 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2489,6 +2489,7 @@
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, 
return_value TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
+   tzobj->initialized = 1;
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re

2008-01-29 Thread Derick Rethans
derick  Tue Jan 29 20:15:44 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_date.re parse_date.c 
  Log:
  - MF53: That should have been ||.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.69&r2=1.70&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.69 
php-src/ext/date/lib/parse_date.re:1.70
--- php-src/ext/date/lib/parse_date.re:1.69 Tue Jan 29 20:08:41 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jan 29 20:15:44 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.69 2008/01/29 20:08:41 derick Exp $ */
+/* $Id: parse_date.re,v 1.70 2008/01/29 20:15:44 derick Exp $ */
 
 #include "timelib.h"
 
@@ -755,7 +755,7 @@
while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') {
++*ptr;
}
-   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' | (*ptr)[3] == '-')) {
+   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' || (*ptr)[3] == '-')) {
*ptr += 3;
}
if (**ptr == '+') {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.78&r2=1.79&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.78 
php-src/ext/date/lib/parse_date.c:1.79
--- php-src/ext/date/lib/parse_date.c:1.78  Tue Jan 29 20:10:53 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jan 29 20:15:44 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Tue Jan 29 21:07:53 2008 */
+/* Generated by re2c 0.12.1 on Tue Jan 29 21:14:49 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.78 2008/01/29 20:10:53 derick Exp $ */
+/* $Id: parse_date.c,v 1.79 2008/01/29 20:15:44 derick Exp $ */
 
 #include "timelib.h"
 
@@ -757,7 +757,7 @@
while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') {
++*ptr;
}
-   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' | (*ptr)[3] == '-')) {
+   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' || (*ptr)[3] == '-')) {
*ptr += 3;
}
if (**ptr == '+') {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re

2008-01-29 Thread Derick Rethans
derick  Tue Jan 29 20:14:28 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - That should have been ||.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.5&r2=1.29.2.30.2.14.2.6&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.5 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.6
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.5Tue Jan 29 
20:10:09 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jan 29 20:14:02 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Tue Jan 29 20:58:48 2008 */
+/* Generated by re2c 0.12.1 on Tue Jan 29 21:13:35 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.5 2008/01/29 20:10:09 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.6 2008/01/29 20:14:02 derick Exp $ */
 
 #include "timelib.h"
 
@@ -757,7 +757,7 @@
while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') {
++*ptr;
}
-   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' | (*ptr)[3] == '-')) {
+   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' || (*ptr)[3] == '-')) {
*ptr += 3;
}
if (**ptr == '+') {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.4&r2=1.26.2.27.2.12.2.5&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.4 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.5
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.4   Tue Jan 29 
20:10:09 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jan 29 20:14:18 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12.2.4 2008/01/29 20:10:09 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.12.2.5 2008/01/29 20:14:18 derick Exp $ */
 
 #include "timelib.h"
 
@@ -755,7 +755,7 @@
while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') {
++*ptr;
}
-   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' | (*ptr)[3] == '-')) {
+   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' || (*ptr)[3] == '-')) {
*ptr += 3;
}
if (**ptr == '+') {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-01-29 Thread Derick Rethans
derick  Tue Jan 29 20:12:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - Make whitespace the same as in HEAD.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.16&r2=1.43.2.45.2.51.2.17&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.16 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.17
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.16 Mon Jan 28 21:12:41 2008
+++ php-src/ext/date/php_date.c Tue Jan 29 20:12:53 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.16 2008/01/28 21:12:41 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.17 2008/01/29 20:12:53 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -221,15 +221,16 @@
 };
 
 const zend_function_entry date_funcs_timezone[] = {
-   PHP_ME(DateTimeZone,__construct,
NULL, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
-   PHP_ME_MAPPING(getName, timezone_name_get,  
NULL, 0)
-   PHP_ME_MAPPING(getOffset,   timezone_offset_get,
NULL, 0)
-   PHP_ME_MAPPING(getTransitions,  timezone_transitions_get,   
NULL, 0)
-   PHP_ME_MAPPING(listAbbreviations,   timezone_abbreviations_list, 
NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
-   PHP_ME_MAPPING(listIdentifiers, timezone_identifiers_list,  
NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+   PHP_ME(DateTimeZone,  __construct, NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+   PHP_ME_MAPPING(getName,   timezone_name_get,   NULL, 0)
+   PHP_ME_MAPPING(getOffset, timezone_offset_get, NULL, 0)
+   PHP_ME_MAPPING(getTransitions,timezone_transitions_get,NULL, 0)
+   PHP_ME_MAPPING(listAbbreviations, timezone_abbreviations_list, NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+   PHP_ME_MAPPING(listIdentifiers,   timezone_identifiers_list,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
{NULL, NULL, NULL}
 };
 
+static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 static void date_register_classes(TSRMLS_D);
 static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 /* }}} */
@@ -1152,7 +1153,7 @@
timelib_time_dtor(now); 
RETURN_FALSE;
}
-   
+
t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB);
error1 = error->error_count;
timelib_error_container_dtor(error);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-01-29 Thread Derick Rethans
derick  Tue Jan 29 20:12:23 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Make whitespace the same as in 5.3.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.162&r2=1.163&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.162 php-src/ext/date/php_date.c:1.163
--- php-src/ext/date/php_date.c:1.162   Mon Jan 28 21:12:24 2008
+++ php-src/ext/date/php_date.c Tue Jan 29 20:12:23 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.162 2008/01/28 21:12:24 derick Exp $ */
+/* $Id: php_date.c,v 1.163 2008/01/29 20:12:23 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -205,7 +205,6 @@
{NULL, NULL, NULL}
 };
 
-
 const zend_function_entry date_funcs_date[] = {
PHP_ME(DateTime,__construct,   NULL, 
ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(createFromFormat, date_create_from_format,   NULL, 
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
@@ -233,8 +232,8 @@
{NULL, NULL, NULL}
 };
 
-static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 static void date_register_classes(TSRMLS_D);
+static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
 /* }}} */
 
 ZEND_DECLARE_MODULE_GLOBALS(date)
@@ -494,9 +493,7 @@
 PHP_MINIT_FUNCTION(date)
 {
REGISTER_INI_ENTRIES();
-
date_register_classes(TSRMLS_C);
-
 /*
  * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt
  *   A Date construct is an element whose content MUST conform to the
@@ -1196,7 +1193,7 @@
 
ret = php_idate(format[0], ts, 0);
if (ret == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date 
format token");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date 
format token.");
RETURN_FALSE;
}
RETURN_LONG(ret);
@@ -1291,7 +1288,7 @@
timelib_tzinfo_dtor(t->tz_info);
}
 
-   timelib_time_dtor(now); 
+   timelib_time_dtor(now);
timelib_time_dtor(t);
 
if (error1 || error2) {
@@ -1514,7 +1511,6 @@
} else {
RETURN_STRINGL(buf, real_len, 0);
}
-
}
efree(buf);
RETURN_FALSE;
@@ -1945,7 +1941,7 @@
 
dateobj->time->have_weekday_relative = dateobj->time->have_relative = 0;
 
-   if (type == TIMELIB_ZONETYPE_ID && now->tz_info != tzi) {
+   if (type == TIMELIB_ZONETYPE_ID && now->tz_info != tzi) {
timelib_tzinfo_dtor(now->tz_info);
}
if (free_tzi) {
@@ -2074,7 +2070,7 @@
add_ascii_assoc_double(return_value, "fraction", 
parsed_time->f);
}
 
-   zval_from_error_container(return_value, error);
+   zval_from_error_container(return_value, error);
 
timelib_error_container_dtor(error);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_date.re /ext/date/tests bug43960.phpt

2008-01-29 Thread Derick Rethans
derick  Tue Jan 29 20:08:42 2008 UTC

  Added files: 
/php-src/ext/date/tests bug43960.phpt 

  Modified files:  
/php-src/ext/date/lib   parse_date.re 
  Log:
  - Fixed bug #43960 (strtotime() returns timestamp in the future when given a
bogus string).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.68&r2=1.69&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.68 
php-src/ext/date/lib/parse_date.re:1.69
--- php-src/ext/date/lib/parse_date.re:1.68 Sun Jan 27 22:15:59 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jan 29 20:08:41 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.68 2008/01/27 22:15:59 derick Exp $ */
+/* $Id: parse_date.re,v 1.69 2008/01/29 20:08:41 derick Exp $ */
 
 #include "timelib.h"
 
@@ -107,7 +107,7 @@
 #define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; 
s->time->relative.weekday_behavior = 1; }
 #define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_weekday_relative = 1; }
 #define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_special_relative = 1; }
-#define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { 
add_warning(s, "Double timezone specification"); timelib_string_free(str); 
return TIMELIB_ERROR; } else { s->time->have_zone = 1; } }
+#define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { 
s->time->have_zone > 1 ? add_error(s, "Double timezone specification") : 
add_warning(s, "Double timezone specification"); timelib_string_free(str); 
s->time->have_zone++; return TIMELIB_ERROR; } else { s->time->have_zone++; } }
 
 #define TIMELIB_INIT  s->cur = cursor; str = timelib_string(s); ptr = str
 #define TIMELIB_DEINIT timelib_string_free(str)
@@ -755,6 +755,9 @@
while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') {
++*ptr;
}
+   if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && 
((*ptr)[3] == '+' | (*ptr)[3] == '-')) {
+   *ptr += 3;
+   }
if (**ptr == '+') {
++*ptr;
t->is_localtime = 1;
@@ -845,7 +848,7 @@
 secondlz = minutelz | "60";
 meridian = ([AaPp] "."? [Mm] "."?) [\000\t ];
 tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+;
-tzcorrection = [+-] hour24 ":"? minute?;
+tzcorrection = "GMT"? [+-] hour24 ":"? minute?;
 
 daysuf = "st" | "nd" | "rd" | "th";
 

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43960.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug43960.phpt
+++ php-src/ext/date/tests/bug43960.phpt
--TEST--
Bug #43960 (strtotime() returns timestamp in the future when given a bogus 
string)
--FILE--

--EXPECT--
bool(false)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /sapi/cli/tests 006.phpt

2008-01-29 Thread Derick Rethans
On Tue, 29 Jan 2008, Antony Dovgal wrote:

> tony2001  Tue Jan 29 12:23:48 2008 UTC
> 
>   Modified files:  (Branch: PHP_5_3)
> /php-src/sapi/cli/tests   006.phpt 
>   Log:
>   fix test
>   Derick, you're adding new methods too fast =)

It's a silly test then ;-) Expect more of this.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 21:12:42 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Added two optional parameters to timezone_transitions_get() /
DateTimeZone::getTranstions() to limit the range of transitions being
returned.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.92&r2=1.2027.2.547.2.965.2.93&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.92 
php-src/NEWS:1.2027.2.547.2.965.2.93
--- php-src/NEWS:1.2027.2.547.2.965.2.92Mon Jan 28 20:30:50 2008
+++ php-src/NEWSMon Jan 28 21:12:41 2008
@@ -20,6 +20,9 @@
 without invoking the date parser. (Scott)
   * date_timestamp_get() / DateTime::getTimestamp() to retrieve the Unix
 timestamp belonging to a date object.
+  * two optional parameters to timezone_transitions_get() /
+DateTimeZone::getTranstions() to limit the range of transitions being
+returned.
 
 - Added ability to store associative infor with objects in SplObjectStorage.
   (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.15&r2=1.43.2.45.2.51.2.16&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.15 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.16
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.15 Mon Jan 28 20:35:17 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 21:12:41 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.15 2008/01/28 20:35:17 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.16 2008/01/28 21:12:41 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2448,16 +2448,17 @@
 }
 /* }}} */
 
-/* {{{ proto array timezone_transitions_get(DateTimeZone object)
-   Returns numeracilly indexed array containing associative array for all 
transitions for the timezone.
+/* {{{ proto array timezone_transitions_get(DateTimeZone object [, long 
timestamp_begin [, long timestamp_end ]])
+   Returns numerically indexed array containing associative array for all 
transitions in the specified range for the timezone.
 */
 PHP_FUNCTION(timezone_transitions_get)
 {
zval*object, *element;
php_timezone_obj*tzobj;
-   int  i;
+   int  i, first = 1;
+   long timestamp_begin = LONG_MIN, timestamp_end = 
LONG_MAX;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O", &object, date_ce_timezone) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O|ll", &object, date_ce_timezone, ×tamp_begin, ×tamp_end) == 
FAILURE) {
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
@@ -2468,15 +2469,30 @@
 
array_init(return_value);
for (i = 0; i < tzobj->tzi.tz->timecnt; ++i) {
-   MAKE_STD_ZVAL(element);
-   array_init(element);
-   add_assoc_long(element, "ts", tzobj->tzi.tz->trans[i]);
-   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 TSRMLS_CC), 
0);
-   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset);
-   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst);
-   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
 1);
+   if (tzobj->tzi.tz->trans[i] >= timestamp_begin && 
tzobj->tzi.tz->trans[i] < timestamp_end) {
+   if (first && timestamp_begin != LONG_MIN && i > 0 && 
timestamp_begin != tzobj->tzi.tz->trans[i])
+   {
+   MAKE_STD_ZVAL(element);
+   array_init(element);
+   add_assoc_long(element, "ts", 
timestamp_begin);
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0);
+   add_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].offset);
+   add_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].isdst);
+   add_assoc_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].abbr_idx],
 1);
 
-   add_next_index_zval(return_value, element);
+   add_next_index_zval(return_value, element);
+   }
+   MAKE_STD_ZVAL(element);
+   array_init(element);
+  

[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 21:12:24 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Added two optional parameters to timezone_transitions_get() /
DateTimeZone::getTranstions() to limit the range of transitions being
returned.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.161&r2=1.162&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.161 php-src/ext/date/php_date.c:1.162
--- php-src/ext/date/php_date.c:1.161   Mon Jan 28 20:36:04 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 21:12:24 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.161 2008/01/28 20:36:04 derick Exp $ */
+/* $Id: php_date.c,v 1.162 2008/01/28 21:12:24 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2606,16 +2606,17 @@
 }
 /* }}} */
 
-/* {{{ proto array timezone_transitions_get(DateTimeZone object)
-   Returns numeracilly indexed array containing associative array for all 
transitions for the timezone.
+/* {{{ proto array timezone_transitions_get(DateTimeZone object [, long 
timestamp_begin [, long timestamp_end ]])
+   Returns numerically indexed array containing associative array for all 
transitions in the specified range for the timezone.
 */
 PHP_FUNCTION(timezone_transitions_get)
 {
zval*object, *element;
php_timezone_obj*tzobj;
-   int  i;
+   int  i, first = 1;
+   long timestamp_begin = LONG_MIN, timestamp_end = 
LONG_MAX;
 
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O", &object, date_ce_timezone) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O|ll", &object, date_ce_timezone, ×tamp_begin, ×tamp_end) == 
FAILURE) {
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
@@ -2626,19 +2627,38 @@
 
array_init(return_value);
for (i = 0; i < tzobj->tzi.tz->timecnt; ++i) {
-   MAKE_STD_ZVAL(element);
-   array_init(element);
-   add_ascii_assoc_long(element, "ts", 
tzobj->tzi.tz->trans[i]);
-   if (UG(unicode)) {
-   add_ascii_assoc_unicode(element, "time", (UChar*) 
php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 TSRMLS_CC), 
0);
-   } else {
-   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 TSRMLS_CC), 
0);
-   }
-   add_ascii_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].offset);
-   add_ascii_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].isdst);
-   add_ascii_assoc_ascii_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx],
 1);
+   if (tzobj->tzi.tz->trans[i] >= timestamp_begin && 
tzobj->tzi.tz->trans[i] < timestamp_end) {
+   if (first && timestamp_begin != LONG_MIN && i > 0 && 
timestamp_begin != tzobj->tzi.tz->trans[i])
+   {
+   MAKE_STD_ZVAL(element);
+   array_init(element);
+   add_ascii_assoc_long(element, "ts", 
timestamp_begin);
+   if (UG(unicode)) {
+   add_ascii_assoc_unicode(element, 
"time", (UChar*) php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 
TSRMLS_CC), 0);
+   } else {
+   add_assoc_string(element, "time", 
php_format_date(DATE_FORMAT_ISO8601, 13, timestamp_begin, 0 TSRMLS_CC), 0);
+   }
+   add_ascii_assoc_long(element, "offset", 
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].offset);
+   add_ascii_assoc_bool(element, "isdst",  
tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].isdst);
+   add_ascii_assoc_ascii_string(element, "abbr", 
&tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i-1]].abbr_idx],
 1);
+
+   add_next_index_zval(return_value, element);
+   }
+   MAKE_STD_ZVAL(element);
+   array_init(element);
+   add_ascii_assoc_long(element, "ts", 
tzobj->tzi.tz->trans[i]);
+   if (UG(unicode)) {
+   add_ascii_assoc_unicode(element, "time", 
(UChar*) php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tzi.tz->trans[i], 0 
TSRMLS_CC), 0);
+   } else {
+   add_assoc_str

[PHP-CVS] cvs: php-src /ext/date/tests strtotime.phpt

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 21:02:09 2008 UTC

  Modified files:  
/php-src/ext/date/tests strtotime.phpt 
  Log:
  - MF53: Fixed test case.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/date/tests/strtotime.phpt
diff -u php-src/ext/date/tests/strtotime.phpt:1.4 
php-src/ext/date/tests/strtotime.phpt:1.5
--- php-src/ext/date/tests/strtotime.phpt:1.4   Sun Jan 27 22:15:59 2008
+++ php-src/ext/date/tests/strtotime.phpt   Mon Jan 28 21:02:09 2008
@@ -16,3 +16,5 @@
 --EXPECT--
 2005-07-14T22:30:41+0200
 2005-07-15T00:30:41+0200
+2005-07-14T22:30:41+0200
+2005-07-14T22:30:41+0200

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests strtotime.phpt

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 21:00:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/tests strtotime.phpt 
  Log:
  - Fixed test case.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime.phpt?r1=1.1.2.2.4.1&r2=1.1.2.2.4.2&diff_format=u
Index: php-src/ext/date/tests/strtotime.phpt
diff -u php-src/ext/date/tests/strtotime.phpt:1.1.2.2.4.1 
php-src/ext/date/tests/strtotime.phpt:1.1.2.2.4.2
--- php-src/ext/date/tests/strtotime.phpt:1.1.2.2.4.1   Sun Jan 27 22:16:48 2008
+++ php-src/ext/date/tests/strtotime.phpt   Mon Jan 28 21:00:14 2008
@@ -16,3 +16,5 @@
 --EXPECT--
 2005-07-14T22:30:41+0200
 2005-07-15T00:30:41+0200
+2005-07-14T22:30:41+0200
+2005-07-14T22:30:41+0200

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 20:36:04 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - MF53: Added missing folding tags.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.160&r2=1.161&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.160 php-src/ext/date/php_date.c:1.161
--- php-src/ext/date/php_date.c:1.160   Mon Jan 28 20:29:40 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 20:36:04 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.160 2008/01/28 20:29:40 derick Exp $ */
+/* $Id: php_date.c,v 1.161 2008/01/28 20:36:04 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2159,6 +2159,7 @@
parsed_time = timelib_parse_from_format(format, date, date_len, &error, 
DATE_TIMEZONEDB);
php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
parsed_time, error);
 }
+/* }}} */
 
 /* {{{ proto string date_format(DateTime object, string format)
Returns date formatted according to given format

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 20:35:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - Add missing folding tags.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.14&r2=1.43.2.45.2.51.2.15&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.14 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.15
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.14 Mon Jan 28 20:30:50 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 20:35:17 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.14 2008/01/28 20:30:50 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.15 2008/01/28 20:35:17 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2029,6 +2029,7 @@
parsed_time = timelib_parse_from_format(format, date, date_len, &error, 
DATE_TIMEZONEDB);
php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
parsed_time, error);
 }
+/* }}} */
 
 /* {{{ proto string date_format(DateTime object, string format)
Returns date formatted according to given format

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c php_date.h

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 20:30:51 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/date   php_date.c php_date.h 
  Log:
  - MFH: Added date_timestamp_get() / DateTime::getTimestamp() to retrieve the
Unix timestamp belonging to a date object.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.91&r2=1.2027.2.547.2.965.2.92&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.91 
php-src/NEWS:1.2027.2.547.2.965.2.92
--- php-src/NEWS:1.2027.2.547.2.965.2.91Mon Jan 28 08:55:19 2008
+++ php-src/NEWSMon Jan 28 20:30:50 2008
@@ -18,6 +18,8 @@
 timezone_identifiers_list() / DateTimezone::listIdentifiers().
   * date_timestamp_set() / DateTime::setTimestamp() to set a Unix timestamp
 without invoking the date parser. (Scott)
+  * date_timestamp_get() / DateTime::getTimestamp() to retrieve the Unix
+timestamp belonging to a date object.
 
 - Added ability to store associative infor with objects in SplObjectStorage.
   (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.13&r2=1.43.2.45.2.51.2.14&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.13 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.14
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.13 Sun Jan 27 17:44:29 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 20:30:50 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.13 2008/01/27 17:44:29 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.14 2008/01/28 20:30:50 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -182,6 +182,7 @@
PHP_FE(date_date_set, NULL)
PHP_FE(date_isodate_set, NULL)
PHP_FE(date_timestamp_set, NULL)
+   PHP_FE(date_timestamp_get, NULL)
 
PHP_FE(timezone_open, NULL)
PHP_FE(timezone_name_get, NULL)
@@ -215,6 +216,7 @@
PHP_ME_MAPPING(setDate, date_date_set,  NULL, 0)
PHP_ME_MAPPING(setISODate,  date_isodate_set,   NULL, 0)
PHP_ME_MAPPING(setTimestamp,date_timestamp_set, NULL, 0)
+   PHP_ME_MAPPING(getTimestamp,date_timestamp_get, NULL, 0)
{NULL, NULL, NULL}
 };
 
@@ -2267,6 +2269,32 @@
 }
 /* }}} */
 
+/* {{{ proto long date_timestamp_get(DateTime object)
+   Gets the Unix timestamp.
+*/
+PHP_FUNCTION(date_timestamp_get)
+{
+   zval *object;
+   php_date_obj *dateobj;
+   long  timestamp;
+   int   error;
+
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O", &object, date_ce_date) == FAILURE) {
+   RETURN_FALSE;
+   }
+   dateobj = (php_date_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
+   DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
+   timelib_update_ts(dateobj->time, NULL);
+
+   timestamp = timelib_date_to_int(dateobj->time, &error);
+   if (error) {
+   RETURN_FALSE;
+   } else {
+   RETVAL_LONG(timestamp);
+   }
+}
+/* }}} */
+
 static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz 
TSRMLS_DC)
 {
char *tzid;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.h?r1=1.17.2.11.2.3.2.3&r2=1.17.2.11.2.3.2.4&diff_format=u
Index: php-src/ext/date/php_date.h
diff -u php-src/ext/date/php_date.h:1.17.2.11.2.3.2.3 
php-src/ext/date/php_date.h:1.17.2.11.2.3.2.4
--- php-src/ext/date/php_date.h:1.17.2.11.2.3.2.3   Sun Jan 13 15:15:48 2008
+++ php-src/ext/date/php_date.h Mon Jan 28 20:30:51 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_date.h,v 1.17.2.11.2.3.2.3 2008/01/13 15:15:48 derick Exp $ */
+/* $Id: php_date.h,v 1.17.2.11.2.3.2.4 2008/01/28 20:30:51 derick Exp $ */
 
 #ifndef PHP_DATE_H
 #define PHP_DATE_H
@@ -63,6 +63,7 @@
 PHP_FUNCTION(date_date_set);
 PHP_FUNCTION(date_isodate_set);
 PHP_FUNCTION(date_timestamp_set);
+PHP_FUNCTION(date_timestamp_get);
 
 PHP_METHOD(DateTimeZone, __construct);
 PHP_FUNCTION(timezone_open);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c php_date.h

2008-01-28 Thread Derick Rethans
derick  Mon Jan 28 20:29:40 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c php_date.h 
  Log:
  - Added DateTime::getTimestamp() / date_timestamp_get().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.159&r2=1.160&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.159 php-src/ext/date/php_date.c:1.160
--- php-src/ext/date/php_date.c:1.159   Sun Jan 27 17:44:16 2008
+++ php-src/ext/date/php_date.c Mon Jan 28 20:29:40 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.159 2008/01/27 17:44:16 derick Exp $ */
+/* $Id: php_date.c,v 1.160 2008/01/28 20:29:40 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -184,6 +184,7 @@
PHP_FE(date_date_set, NULL)
PHP_FE(date_isodate_set, NULL)
PHP_FE(date_timestamp_set, NULL)
+   PHP_FE(date_timestamp_get, NULL)
 
PHP_FE(timezone_open, NULL)
PHP_FE(timezone_name_get, NULL)
@@ -218,6 +219,7 @@
PHP_ME_MAPPING(setDate, date_date_set, NULL, 0)
PHP_ME_MAPPING(setISODate,  date_isodate_set,  NULL, 0)
PHP_ME_MAPPING(setTimestamp,date_timestamp_set, NULL, 0)
+   PHP_ME_MAPPING(getTimestamp,date_timestamp_get, NULL, 0)
{NULL, NULL, NULL}
 };
 
@@ -2425,6 +2427,32 @@
 }
 /* }}} */
 
+/* {{{ proto long date_timestamp_get(DateTime object)
+   Gets the Unix timestamp.
+*/
+PHP_FUNCTION(date_timestamp_get)
+{
+   zval *object;
+   php_date_obj *dateobj;
+   long  timestamp;
+   int   error;
+
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O", &object, date_ce_date) == FAILURE) {
+   RETURN_FALSE;
+   }
+   dateobj = (php_date_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
+   DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
+   timelib_update_ts(dateobj->time, NULL);
+
+   timestamp = timelib_date_to_int(dateobj->time, &error);
+   if (error) {
+   RETURN_FALSE;
+   } else {
+   RETVAL_LONG(timestamp);
+   }
+}
+/* }}} */
+
 static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz 
TSRMLS_DC)
 {
char *tzid;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.h?r1=1.35&r2=1.36&diff_format=u
Index: php-src/ext/date/php_date.h
diff -u php-src/ext/date/php_date.h:1.35 php-src/ext/date/php_date.h:1.36
--- php-src/ext/date/php_date.h:1.35Sun Jan 13 15:16:47 2008
+++ php-src/ext/date/php_date.h Mon Jan 28 20:29:40 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_date.h,v 1.35 2008/01/13 15:16:47 derick Exp $ */
+/* $Id: php_date.h,v 1.36 2008/01/28 20:29:40 derick Exp $ */
 
 #ifndef PHP_DATE_H
 #define PHP_DATE_H
@@ -64,6 +64,7 @@
 PHP_FUNCTION(date_date_set);
 PHP_FUNCTION(date_isodate_set);
 PHP_FUNCTION(date_timestamp_set);
+PHP_FUNCTION(date_timestamp_get);
 
 PHP_METHOD(DateTimeZone, __construct);
 PHP_FUNCTION(timezone_open);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re /ext/date/tests date_create-2.phpt strtotime.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 22:16:58 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_date.c parse_date.re 
/php-src/ext/date/tests date_create-2.phpt strtotime.phpt 
  Log:
  - MFH: Fixed parsing of timezones
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.3&r2=1.29.2.30.2.14.2.4&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.3 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.4
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.3Thu Jan 17 
20:44:54 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Jan 27 22:16:33 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jan 17 21:36:33 2008 */
+/* Generated by re2c 0.12.1 on Sun Jan 27 23:04:23 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.3 2008/01/17 20:44:54 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.4 2008/01/27 22:16:33 derick Exp $ */
 
 #include "timelib.h"
 
@@ -975,7 +975,7 @@
}
 yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1501 "ext/date/lib/parse_date.re"
+#line 1502 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1299,7 +1299,7 @@
if(yych <= '9') goto yy1274;
 yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1596 "ext/date/lib/parse_date.re"
+#line 1597 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
@@ -2310,7 +2310,7 @@
if(yych <= '9') goto yy51;
 yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1585 "ext/date/lib/parse_date.re"
+#line 1586 "ext/date/lib/parse_date.re"
{
goto std;
}
@@ -2323,7 +2323,7 @@
YYDEBUG(48, *YYCURSOR);
++YYCURSOR;
YYDEBUG(49, *YYCURSOR);
-#line 1590 "ext/date/lib/parse_date.re"
+#line 1591 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
@@ -2707,7 +2707,7 @@
if(yych == 's') goto yy70;
 yy69:
YYDEBUG(69, *YYCURSOR);
-#line 1569 "ext/date/lib/parse_date.re"
+#line 1570 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -3630,7 +3630,7 @@
if(yych == 's') goto yy175;
 yy174:
YYDEBUG(174, *YYCURSOR);
-#line 1474 "ext/date/lib/parse_date.re"
+#line 1475 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -4821,7 +4821,7 @@
}
 yy276:
YYDEBUG(276, *YYCURSOR);
-#line 1458 "ext/date/lib/parse_date.re"
+#line 1459 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -5313,7 +5313,7 @@
}
 yy303:
YYDEBUG(303, *YYCURSOR);
-#line 1491 "ext/date/lib/parse_date.re"
+#line 1492 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -5373,7 +5373,7 @@
}
 yy308:
YYDEBUG(308, *YYCURSOR);
-#line 1270 "ext/date/lib/parse_date.re"
+#line 1271 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_INIT;
@@ -5658,7 +5658,7 @@
}
 yy332:
YYDEBUG(332, *YYCURSOR);
-#line 1539 "ext/date/lib/parse_date.re"
+#line 1540 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | 
dateshortwithtimelongtz");
@@ -6298,7 +6298,7 @@
YYDEBUG(385, *YYCURSOR);
++YYCURSOR;
YYDEBUG(386, *YYCURSOR);
-#line 1515 "ext/date/lib/parse_date.re"
+#line 1516 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | 
dateshortwithtimelong12");
TIMELIB_INIT;
@@ -6497,7 +6497,7 @@
if(yych <= '9') goto yy397;
 yy402:
YYDEBUG(402, *YYCURSOR);
-#line 1244 "ext/date/lib/parse_date.re"
+#line 1245 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoday");
TIMELIB_INIT;
@@ -7745,7 +7745,7 @@
if(yych <= '9') goto yy474;
 yy473:
YYDEBUG(473, *YYCURSOR);
-#line 1384 "ext/date/lib/parse_date.re"
+#line 1385 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextshort");
TIMELIB_INIT;

[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re /ext/date/tests date_create-2.phpt strtotime.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 22:16:00 2008 UTC

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
/php-src/ext/date/tests date_create-2.phpt strtotime.phpt 
  Log:
  - Fixed parsing of timestamps.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.76&r2=1.77&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.76 
php-src/ext/date/lib/parse_date.c:1.77
--- php-src/ext/date/lib/parse_date.c:1.76  Thu Jan 17 20:43:58 2008
+++ php-src/ext/date/lib/parse_date.c   Sun Jan 27 22:15:59 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jan 17 21:42:37 2008 */
+/* Generated by re2c 0.12.1 on Sun Jan 27 23:15:51 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.76 2008/01/17 20:43:58 derick Exp $ */
+/* $Id: parse_date.c,v 1.77 2008/01/27 22:15:59 derick Exp $ */
 
 #include "timelib.h"
 
@@ -975,7 +975,7 @@
}
 yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1501 "ext/date/lib/parse_date.re"
+#line 1502 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1299,7 +1299,7 @@
if(yych <= '9') goto yy1274;
 yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1596 "ext/date/lib/parse_date.re"
+#line 1597 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
@@ -2310,7 +2310,7 @@
if(yych <= '9') goto yy51;
 yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1585 "ext/date/lib/parse_date.re"
+#line 1586 "ext/date/lib/parse_date.re"
{
goto std;
}
@@ -2323,7 +2323,7 @@
YYDEBUG(48, *YYCURSOR);
++YYCURSOR;
YYDEBUG(49, *YYCURSOR);
-#line 1590 "ext/date/lib/parse_date.re"
+#line 1591 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
@@ -2707,7 +2707,7 @@
if(yych == 's') goto yy70;
 yy69:
YYDEBUG(69, *YYCURSOR);
-#line 1569 "ext/date/lib/parse_date.re"
+#line 1570 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -3630,7 +3630,7 @@
if(yych == 's') goto yy175;
 yy174:
YYDEBUG(174, *YYCURSOR);
-#line 1474 "ext/date/lib/parse_date.re"
+#line 1475 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -4821,7 +4821,7 @@
}
 yy276:
YYDEBUG(276, *YYCURSOR);
-#line 1458 "ext/date/lib/parse_date.re"
+#line 1459 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -5313,7 +5313,7 @@
}
 yy303:
YYDEBUG(303, *YYCURSOR);
-#line 1491 "ext/date/lib/parse_date.re"
+#line 1492 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -5373,7 +5373,7 @@
}
 yy308:
YYDEBUG(308, *YYCURSOR);
-#line 1270 "ext/date/lib/parse_date.re"
+#line 1271 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_INIT;
@@ -5658,7 +5658,7 @@
}
 yy332:
YYDEBUG(332, *YYCURSOR);
-#line 1539 "ext/date/lib/parse_date.re"
+#line 1540 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | 
dateshortwithtimelongtz");
@@ -6298,7 +6298,7 @@
YYDEBUG(385, *YYCURSOR);
++YYCURSOR;
YYDEBUG(386, *YYCURSOR);
-#line 1515 "ext/date/lib/parse_date.re"
+#line 1516 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | 
dateshortwithtimelong12");
TIMELIB_INIT;
@@ -6497,7 +6497,7 @@
if(yych <= '9') goto yy397;
 yy402:
YYDEBUG(402, *YYCURSOR);
-#line 1244 "ext/date/lib/parse_date.re"
+#line 1245 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoday");
TIMELIB_INIT;
@@ -7745,7 +7745,7 @@
if(yych <= '9') goto yy474;
 yy473:
YYDEBUG(473, *YYCURSOR);
-#line 1384 "ext/date/lib/parse_date.re"
+#line 1385 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextshort");
TIMELIB_INIT;
@@ -9638,7 +9638,7 @@
}
 yy558:
YYDEBUG(558, *YYCURSOR);
-#line 1440 "ext/date/lib/parse_

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:44:29 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Update proto
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.12&r2=1.43.2.45.2.51.2.13&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.13
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12 Sun Jan 27 17:29:14 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:44:29 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.12 2008/01/27 17:29:14 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.13 2008/01/27 17:44:29 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2467,7 +2467,7 @@
return 0;
 }
 
-/* {{{ proto array timezone_identifiers_list()
+/* {{{ proto array timezone_identifiers_list([long what])
Returns numerically index array with all timezone identifiers.
 */
 PHP_FUNCTION(timezone_identifiers_list)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:44:16 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Update proto.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.158&r2=1.159&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.158 php-src/ext/date/php_date.c:1.159
--- php-src/ext/date/php_date.c:1.158   Sun Jan 27 17:28:57 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:44:16 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.158 2008/01/27 17:28:57 derick Exp $ */
+/* $Id: php_date.c,v 1.159 2008/01/27 17:44:16 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2629,7 +2629,7 @@
return 0;
 }
 
-/* {{{ proto array timezone_identifiers_list()
+/* {{{ proto array timezone_identifiers_list([long what])
Returns numerically index array with all timezone identifiers.
 */
 PHP_FUNCTION(timezone_identifiers_list)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/tests timezones-list.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:29:15 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests timezones-list.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Added support for selectively listing timezone identifiers through
timezone_identifiers_list() / DateTimezone::listIdentifiers().
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.88&r2=1.2027.2.547.2.965.2.89&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.88 
php-src/NEWS:1.2027.2.547.2.965.2.89
--- php-src/NEWS:1.2027.2.547.2.965.2.88Fri Jan 25 18:10:45 2008
+++ php-src/NEWSSun Jan 27 17:29:14 2008
@@ -2,7 +2,7 @@
 |||
 ?? ??? 20??, PHP 5.3.0
 - Added garbage collector. (David Wang, Dmitry).
-- Added new date/time functionality:
+- Added new date/time functionality: (Derick)
 
   * date_parse_from_format(): Parse date/time strings according to a format.
   * date_create_from_format()/DateTime::createFromFormat(): Create a date/time
@@ -14,6 +14,10 @@
- date_parse_from_format()
   * support for abbreviation and offset based timezone specifiers for
 DateTime::getOffset() and DateTime::getName().
+  * support for selectively listing timezone identifiers through
+timezone_identifiers_list() / DateTimezone::listIdentifiers().
+  * date_timestamp_set() / DateTime::setTimestamp() to set a Unix timestamp
+without invoking the date parser. (Scott)
 
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
@@ -40,8 +44,6 @@
   (Etienne Kneuss)
 - Added "compact" handler for Zend MM storage. (Dmitry)
 - Added "+" and "*" specifiers to zend_parse_parameters(). (Andrei)
-- Added DateTime::setTimestamp() to set a unix timestamp without
-  invoking the date parser. (Scott)
 - Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
 
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.11&r2=1.43.2.45.2.51.2.12&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.11 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.12
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.11 Thu Jan 17 20:35:01 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:29:14 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.11 2008/01/17 20:35:01 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.12 2008/01/27 17:29:14 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1497,6 +1497,19 @@
 }
 /* }}} */
 
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+
 static void date_register_classes(TSRMLS_D)
 {
zend_class_entry ce_date, ce_timezone;
@@ -1529,6 +1542,22 @@
date_ce_timezone = zend_register_internal_class_ex(&ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(&date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
+
+#define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AMERICA", 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ANTARCTICA",  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ARCTIC",  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ASIA",
PHP_DATE_TIMEZONE_GROUP_ASIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ATLANTIC",
PHP_DATE_TIMEZONE_GROUP_ATLANTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AUSTRALIA",   
PHP_DATE_TIMEZONE_GROUP_AUSTRALIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("EUROPE",  
PHP_DATE_TIMEZONE_GROUP_EUROPE);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("INDIAN",  
PHP_DATE_TIMEZONE_GROUP_INDIAN);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("PACIFIC", 
PHP_DATE_TIMEZONE_GROUP_PACIFIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("UTC", 
PHP_DATE_TIMEZONE_GROUP_UTC);
+  

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests timezones-list.phpt

2008-01-27 Thread Derick Rethans
derick  Sun Jan 27 17:28:58 2008 UTC

  Added files: 
/php-src/ext/date/tests timezones-list.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Added support for selectively listing timezone identifiers through
timezone_identifiers_list() / DateTimezone::listIdentifiers().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.157&r2=1.158&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.157 php-src/ext/date/php_date.c:1.158
--- php-src/ext/date/php_date.c:1.157   Wed Jan 23 15:14:18 2008
+++ php-src/ext/date/php_date.c Sun Jan 27 17:28:57 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.157 2008/01/23 15:14:18 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.158 2008/01/27 17:28:57 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1627,6 +1627,19 @@
 }
 /* }}} */
 
+#define PHP_DATE_TIMEZONE_GROUP_AMERICA0x0001
+#define PHP_DATE_TIMEZONE_GROUP_ANTARCTICA 0x0002
+#define PHP_DATE_TIMEZONE_GROUP_ARCTIC 0x0004
+#define PHP_DATE_TIMEZONE_GROUP_ASIA   0x0008
+#define PHP_DATE_TIMEZONE_GROUP_ATLANTIC   0x0010
+#define PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  0x0020
+#define PHP_DATE_TIMEZONE_GROUP_EUROPE 0x0040
+#define PHP_DATE_TIMEZONE_GROUP_INDIAN 0x0080
+#define PHP_DATE_TIMEZONE_GROUP_PACIFIC0x0100
+#define PHP_DATE_TIMEZONE_GROUP_UTC0x0200
+#define PHP_DATE_TIMEZONE_GROUP_ALL0x03FF
+#define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x07FF
+
 static void date_register_classes(TSRMLS_D)
 {
zend_class_entry ce_date, ce_timezone;
@@ -1659,6 +1672,22 @@
date_ce_timezone = zend_register_internal_class_ex(&ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(&date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
+
+#define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_timezone, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AMERICA", 
PHP_DATE_TIMEZONE_GROUP_AMERICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ANTARCTICA",  
PHP_DATE_TIMEZONE_GROUP_ANTARCTICA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ARCTIC",  
PHP_DATE_TIMEZONE_GROUP_ARCTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ASIA",
PHP_DATE_TIMEZONE_GROUP_ASIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ATLANTIC",
PHP_DATE_TIMEZONE_GROUP_ATLANTIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("AUSTRALIA",   
PHP_DATE_TIMEZONE_GROUP_AUSTRALIA);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("EUROPE",  
PHP_DATE_TIMEZONE_GROUP_EUROPE);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("INDIAN",  
PHP_DATE_TIMEZONE_GROUP_INDIAN);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("PACIFIC", 
PHP_DATE_TIMEZONE_GROUP_PACIFIC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("UTC", 
PHP_DATE_TIMEZONE_GROUP_UTC);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ALL", 
PHP_DATE_TIMEZONE_GROUP_ALL);
+   REGISTER_TIMEZONE_CLASS_CONST_STRING("ALL_WITH_BC", 
PHP_DATE_TIMEZONE_GROUP_ALL_W_BC);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -2585,6 +2614,21 @@
 }
 /* }}} */
 
+static int check_id_allowed(char *id, long what)
+{
+   if (what & PHP_DATE_TIMEZONE_GROUP_AMERICA&& strncasecmp(id, 
"America/", 8) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_ANTARCTICA && strncasecmp(id, 
"Antarctica/", 11) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_ARCTIC && strncasecmp(id, 
"Arctic/",  7) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_ASIA   && strncasecmp(id, 
"Asia/",5) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_ATLANTIC   && strncasecmp(id, 
"Atlantic/",9) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_AUSTRALIA  && strncasecmp(id, 
"Australia/",  10) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_EUROPE && strncasecmp(id, 
"Europe/",  7) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_INDIAN && strncasecmp(id, 
"Indian/",  7) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_PACIFIC&& strncasecmp(id, 
"Pacific/", 8) == 0) return 1;
+   if (what & PHP_DATE_TIMEZONE_GROUP_UTC&& strncasecmp(id, "UTC", 
 3) == 0) return 1;
+   return 0;
+}
+
 /* {{{ proto array timezone_identifiers_list()
Returns numerically index array with all timezone identifiers.
 */
@@ -2593,6 +2637,11 @@
const timelib_tzdb *tzdb;
const timelib_tzdb_index_entry *table;
int i, item_count;
+   longwhat = PHP_DATE_

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date php_date.c /ext/date/lib parse_date.c tm2unixtime.c /ext/date/tests bug40743.phpt bug41599.phpt bug42910.phpt bug43003.phpt bug43527.phpt bug43808.p

2008-01-26 Thread Derick Rethans
derick  Sat Jan 26 16:26:56 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests bug40743.phpt bug41599.phpt bug42910.phpt 
bug43003.phpt bug43527.phpt bug43808.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c tm2unixtime.c 
  Log:
  - MFH Bugfixes:
- Fixed bug #43808 (date_create never fails (even when it should)).
- Fixed bug #43527 (DateTime created from a timestamp reports 
environment
  timezone).
- Fixed bug #43003 (Invalid timezone reported for DateTime objects
  constructed using a timestamp).
- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator
  invalidates DateTimeZone).
- Fixed bug #41599 (setTime() fails after modify() is used).
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1059&r2=1.2027.2.547.2.1060&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1059 php-src/NEWS:1.2027.2.547.2.1060
--- php-src/NEWS:1.2027.2.547.2.1059Wed Jan 23 01:22:57 2008
+++ php-src/NEWSSat Jan 26 16:26:33 2008
@@ -16,6 +16,7 @@
   in mysql_connect()). (Hannes)
 - Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251).
   (phprus at gmail dot com, Tony)
+- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
 - Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file 
headers).
   (Greg)
 - Fixed bug #43703 (Signature compatibility check broken). (Dmitry)
@@ -32,6 +33,8 @@
 - Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url()  
   function). (Ilia)
 - Fixed bug #43533 (escapeshellarg('') returns null). (Ilia)
+- Fixed bug #43527 (DateTime created from a timestamp reports environment
+  timezone). (Derick)
 - Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe,
   Ilia, Tony)
 - Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory).
@@ -57,6 +60,8 @@
   (Jani)
 - Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is
   invalid PHP expression and 'e' option is used). (Jani)
+- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
+  using a timestamp). (Derick)
 - Fixed bug #43295 (crash because of uninitialized SG(sapi_headers).mimetype). 
   (Dmitry)
 - Fixed bug #43293 (Multiple segfaults in getopt()). (Hannes)
@@ -87,6 +92,9 @@
 - Fixed bug #42272 (var_export() incorrectly escapes char(0)). (Derick)
 - Fixed bug #42261 (Incorrect lengths for date and boolean data types).
   (Ilia)
+- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates
+  DateTimeZone). (Derick)
+- Fixed bug #41599 (setTime() fails after modify() is used). (Derick)
 - Fixed bug #38468 (Unexpected creation of cycle). (Dmitry)
 
 08 Nov 2007, PHP 5.2.5
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.53&r2=1.43.2.45.2.54&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.53 
php-src/ext/date/php_date.c:1.43.2.45.2.54
--- php-src/ext/date/php_date.c:1.43.2.45.2.53  Mon Dec 31 07:20:05 2007
+++ php-src/ext/date/php_date.c Sat Jan 26 16:26:33 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.53 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.54 2008/01/26 16:26:33 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -266,7 +266,18 @@
 
 struct _php_timezone_obj {
zend_object std;
-   timelib_tzinfo *tz;
+   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;
+   } tzi;
 };
 
 #define DATE_SET_CONTEXT \
@@ -808,7 +819,26 @@
  );
  break;
case 'T': length = slprintf(buffer, 32, "%s", localtime 
? offset->abbr : "GMT"); break;
-   case 'e': length = slprintf(buffer, 32, "%s", localtime 
? t->tz_info->name : "UTC"); break;
+   case 'e': if (!localtime) {
+ length = slprintf(buffer, 32, 
"%s", "UTC");
+ } else {
+ switch (t->zone_type) {
+ case 
TIMELIB_ZONETYPE_ID:
+ len

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date/lib tm2unixtime.c /ext/date/tests bug41599.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:59:10 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests bug41599.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date/lib   tm2unixtime.c 
  Log:
  - Fixed bug #41599 (setTime() fails after modify() is used).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.76&r2=1.2027.2.547.2.965.2.77&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.76 
php-src/NEWS:1.2027.2.547.2.965.2.77
--- php-src/NEWS:1.2027.2.547.2.965.2.76Thu Jan 17 20:44:53 2008
+++ php-src/NEWSThu Jan 17 20:59:10 2008
@@ -106,6 +106,7 @@
   DateTimeZone). (Derick)
 - Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric
   characters). (Jani)
+- Fixed bug #41599 (setTime() fails after modify() is used). (Derick)
 - Fixed bug #41522 (PDO firebird driver returns null if it fails to connect). 
   (Lars W)
 - Fixed bug #39822 (new PDO() doesn't work with firebird). (Lars W)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/tm2unixtime.c?r1=1.13.2.3.2.2.2.1&r2=1.13.2.3.2.2.2.2&diff_format=u
Index: php-src/ext/date/lib/tm2unixtime.c
diff -u php-src/ext/date/lib/tm2unixtime.c:1.13.2.3.2.2.2.1 
php-src/ext/date/lib/tm2unixtime.c:1.13.2.3.2.2.2.2
--- php-src/ext/date/lib/tm2unixtime.c:1.13.2.3.2.2.2.1 Mon Dec 31 07:17:07 2007
+++ php-src/ext/date/lib/tm2unixtime.c  Thu Jan 17 20:59:10 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: tm2unixtime.c,v 1.13.2.3.2.2.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: tm2unixtime.c,v 1.13.2.3.2.2.2.2 2008/01/17 20:59:10 derick Exp $ */
 
 #include "timelib.h"
 
@@ -98,6 +98,7 @@
} else {
time->d -= (7 - (abs(time->relative.weekday) - current_dow));
}
+   time->have_weekday_relative = 0;
 }
 
 static void do_normalize(timelib_time* time)
@@ -130,6 +131,7 @@
do_normalize(time);
 
memset(&(time->relative), 0, sizeof(time->relative));
+   time->have_relative = 0;
 }
 
 static void do_adjust_special_weekday(timelib_time* time)

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41599.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug41599.phpt
+++ php-src/ext/date/tests/bug41599.phpt
--TEST--
Bug #41599 (setTime() fails after modify() is used)
--FILE--
format('Y-m-d H:i:s'),PHP_EOL;
//good

$start->modify('Tuesday');
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//good

$start->setTime(4, 0, 0);
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//jumped to next Sunday

$start->setTime(8, 0, 0);
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//jumped to next Sunday again
?>
--EXPECT--
2008-01-14 00:00:00
2008-01-15 00:00:00
2008-01-15 04:00:00
2008-01-15 08:00:00

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib tm2unixtime.c /ext/date/tests bug41599.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:58:27 2008 UTC

  Added files: 
/php-src/ext/date/tests bug41599.phpt 

  Modified files:  
/php-src/ext/date/lib   tm2unixtime.c 
  Log:
  - Fixed bug #41599 (setTime() fails after modify() is used).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/tm2unixtime.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/date/lib/tm2unixtime.c
diff -u php-src/ext/date/lib/tm2unixtime.c:1.19 
php-src/ext/date/lib/tm2unixtime.c:1.20
--- php-src/ext/date/lib/tm2unixtime.c:1.19 Mon Dec 31 07:12:08 2007
+++ php-src/ext/date/lib/tm2unixtime.c  Thu Jan 17 20:58:26 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: tm2unixtime.c,v 1.19 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: tm2unixtime.c,v 1.20 2008/01/17 20:58:26 derick Exp $ */
 
 #include "timelib.h"
 
@@ -98,6 +98,7 @@
} else {
time->d -= (7 - (abs(time->relative.weekday) - current_dow));
}
+   time->have_weekday_relative = 0;
 }
 
 static void do_normalize(timelib_time* time)
@@ -130,6 +131,7 @@
do_normalize(time);
 
memset(&(time->relative), 0, sizeof(time->relative));
+   time->have_relative = 0;
 }
 
 static void do_adjust_special_weekday(timelib_time* time)

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug41599.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug41599.phpt
+++ php-src/ext/date/tests/bug41599.phpt
--TEST--
Bug #41599 (setTime() fails after modify() is used)
--FILE--
format('Y-m-d H:i:s'),PHP_EOL;
//good

$start->modify('Tuesday');
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//good

$start->setTime(4, 0, 0);
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//jumped to next Sunday

$start->setTime(8, 0, 0);
echo $start->format('Y-m-d H:i:s'),PHP_EOL;
//jumped to next Sunday again
?>
--EXPECT--
2008-01-14 00:00:00
2008-01-15 00:00:00
2008-01-15 04:00:00
2008-01-15 08:00:00

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date/lib parse_date.c parse_date.re /ext/date/tests bug43075.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:45:17 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests bug43075.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - MFH: Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.75&r2=1.2027.2.547.2.965.2.76&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.75 
php-src/NEWS:1.2027.2.547.2.965.2.76
--- php-src/NEWS:1.2027.2.547.2.965.2.75Thu Jan 17 20:35:01 2008
+++ php-src/NEWSThu Jan 17 20:44:53 2008
@@ -80,6 +80,7 @@
 - Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
 - Fixed bug #43527 (DateTime created from a timestamp reports environment
   timezone). (Derick)
+- Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00). (Derick)
 - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
   using a timestamp). (Derick)
 - Fixed bug #43143 (Warning about empty IV with MCRYPT_MODE_ECB). (Derick)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.2&r2=1.29.2.30.2.14.2.3&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.2 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.3
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.2Thu Jan 17 
18:49:31 2008
+++ php-src/ext/date/lib/parse_date.c   Thu Jan 17 20:44:54 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Jan 17 09:50:31 2008 */
+/* Generated by re2c 0.12.1 on Thu Jan 17 21:36:33 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.2 2008/01/17 18:49:31 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.3 2008/01/17 20:44:54 derick Exp $ */
 
 #include "timelib.h"
 
@@ -1451,8 +1451,8 @@
case '0':
case '1':
case '2':
-   case '3':   goto yy1238;
-   case '4':
+   case '3':
+   case '4':   goto yy1238;
case '5':
case '6':
case '7':
@@ -5548,7 +5548,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy403;
+   if(yych <= '4') goto yy403;
if(yych <= '9') goto yy400;
if(yych <= ':') goto yy371;
goto yy308;
@@ -5630,7 +5630,7 @@
if(yych == '.') goto yy330;
goto yy53;
} else {
-   if(yych <= '3') goto yy329;
+   if(yych <= '4') goto yy329;
if(yych == ':') goto yy330;
goto yy53;
}
@@ -6013,7 +6013,7 @@
yych = *++YYCURSOR;
if(yych <= '5') {
if(yych <= '/') goto yy332;
-   if(yych >= '4') goto yy365;
+   if(yych >= '5') goto yy365;
} else {
if(yych <= '9') goto yy337;
if(yych <= ':') goto yy364;
@@ -6073,7 +6073,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy398;
+   if(yych <= '4') goto yy398;
if(yych <= '9') goto yy370;
if(yych <= ':') goto yy371;
goto yy308;
@@ -6633,7 +6633,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy413;
+   if(yych <= '4') goto yy413;
if(yych <= '9') goto yy412;
if(yych <= ':') goto yy371;
goto yy308;
@@ -6714,7 +6714,7 @@
if(yych == '.') goto yy420;
goto yy308;
} else {
-   if(yych <= '3') goto yy434;
+   if(yych <= '4') goto yy434;
if(yych <= '9') goto yy433;
if(yych <= ':') goto yy420;
goto yy308;
@@ -7210,7 +7210,7 @@
if(yych == '.') goto yy447;
goto yy308;
} else {
-   if(yych <= '3') goto yy458;
+   if(yych <= '4') goto yy458;
if(yych <= '9') goto yy457;
if(yych <= ':') goto yy447;
 

[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re /ext/date/tests bug43075.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:43:58 2008 UTC

  Added files: 
/php-src/ext/date/tests bug43075.phpt 

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.75&r2=1.76&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.75 
php-src/ext/date/lib/parse_date.c:1.76
--- php-src/ext/date/lib/parse_date.c:1.75  Sun Jan 13 15:16:47 2008
+++ php-src/ext/date/lib/parse_date.c   Thu Jan 17 20:43:58 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Sun Jan 13 15:57:11 2008 */
+/* Generated by re2c 0.12.1 on Thu Jan 17 21:42:37 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.75 2008/01/13 15:16:47 derick Exp $ */
+/* $Id: parse_date.c,v 1.76 2008/01/17 20:43:58 derick Exp $ */
 
 #include "timelib.h"
 
@@ -1451,8 +1451,8 @@
case '0':
case '1':
case '2':
-   case '3':   goto yy1238;
-   case '4':
+   case '3':
+   case '4':   goto yy1238;
case '5':
case '6':
case '7':
@@ -5548,7 +5548,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy403;
+   if(yych <= '4') goto yy403;
if(yych <= '9') goto yy400;
if(yych <= ':') goto yy371;
goto yy308;
@@ -5630,7 +5630,7 @@
if(yych == '.') goto yy330;
goto yy53;
} else {
-   if(yych <= '3') goto yy329;
+   if(yych <= '4') goto yy329;
if(yych == ':') goto yy330;
goto yy53;
}
@@ -6013,7 +6013,7 @@
yych = *++YYCURSOR;
if(yych <= '5') {
if(yych <= '/') goto yy332;
-   if(yych >= '4') goto yy365;
+   if(yych >= '5') goto yy365;
} else {
if(yych <= '9') goto yy337;
if(yych <= ':') goto yy364;
@@ -6073,7 +6073,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy398;
+   if(yych <= '4') goto yy398;
if(yych <= '9') goto yy370;
if(yych <= ':') goto yy371;
goto yy308;
@@ -6633,7 +6633,7 @@
if(yych == '.') goto yy371;
goto yy308;
} else {
-   if(yych <= '3') goto yy413;
+   if(yych <= '4') goto yy413;
if(yych <= '9') goto yy412;
if(yych <= ':') goto yy371;
goto yy308;
@@ -6714,7 +6714,7 @@
if(yych == '.') goto yy420;
goto yy308;
} else {
-   if(yych <= '3') goto yy434;
+   if(yych <= '4') goto yy434;
if(yych <= '9') goto yy433;
if(yych <= ':') goto yy420;
goto yy308;
@@ -7210,7 +7210,7 @@
if(yych == '.') goto yy447;
goto yy308;
} else {
-   if(yych <= '3') goto yy458;
+   if(yych <= '4') goto yy458;
if(yych <= '9') goto yy457;
if(yych <= ':') goto yy447;
goto yy308;
@@ -11893,7 +11893,7 @@
if(yych <= 0x1F) goto yy3;
goto yy57;
} else {
-   if(yych <= '3') {
+   if(yych <= '4') {
if(yych <= '/') goto yy3;
goto yy662;
} else {
@@ -15000,7 +15000,7 @@
YYDEBUG(874, *YYCURSOR);
yych = *++YYCURSOR;
if(yych <= '/') goto yy53;
-   if(yych >= '4') goto yy53;
+   if(yych >= '5') goto yy53;
 yy875:
YYDEBUG(875, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15095,7 +15095,7 @@
yych = *++YYCURSOR;
if(yych <= '5') {
   

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/tests bug43808.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:35:02 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests bug43808.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fixed bug #43808 (date_create never fails (even when it should)).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.74&r2=1.2027.2.547.2.965.2.75&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.74 
php-src/NEWS:1.2027.2.547.2.965.2.75
--- php-src/NEWS:1.2027.2.547.2.965.2.74Thu Jan 17 19:58:59 2008
+++ php-src/NEWSThu Jan 17 20:35:01 2008
@@ -77,6 +77,7 @@
 
 - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
 
+- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
 - Fixed bug #43527 (DateTime created from a timestamp reports environment
   timezone). (Derick)
 - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.10&r2=1.43.2.45.2.51.2.11&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.10 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.11
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.10 Thu Jan 17 19:59:00 2008
+++ php-src/ext/date/php_date.c Thu Jan 17 20:35:01 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.10 2008/01/17 19:59:00 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.11 2008/01/17 20:35:01 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1702,7 +1702,7 @@
DATEG(last_errors) = last_errors;
 }
 
-static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, 
int time_str_len, char *format, zval *timezone_object TSRMLS_DC)
+static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, 
int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
 {
timelib_time   *now;
timelib_tzinfo *tzi;
@@ -1726,6 +1726,16 @@
// update last errors and warnings
update_errors_warnings(err TSRMLS_CC);
 
+
+   if (ctor && err && err->error_count) {
+   /* spit out the first library error message, at least */
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse 
time string (%s) at position %d (%c): %s", time_str,
+   err->error_messages[0].position, 
err->error_messages[0].character, err->error_messages[0].message);
+   }
+   if (err && err->error_count) {
+   return 0;
+   }
+
if (timezone_object) {
php_timezone_obj *tzobj;
 
@@ -1780,7 +1790,9 @@
if (free_tzi) {
timelib_tzinfo_dtor(tzi);
}
-   timelib_time_dtor(now); 
+   timelib_time_dtor(now);
+
+   return 1;
 }
 
 /* {{{ proto DateTime date_create([string time[, DateTimeZone object]])
@@ -1797,7 +1809,9 @@
}
 
date_instantiate(date_ce_date, return_value TSRMLS_CC);
-   date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), 
time_str, time_str_len, NULL, timezone_object TSRMLS_CC);
+   if (!date_initialize(zend_object_store_get_object(return_value 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
@@ -1815,7 +1829,9 @@
}
 
date_instantiate(date_ce_date, return_value TSRMLS_CC);
-   date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), 
time_str, time_str_len, format_str, timezone_object TSRMLS_CC);
+   if (!date_initialize(zend_object_store_get_object(return_value 
TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
@@ -1830,7 +1846,7 @@

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", 
&time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
-   date_initialize(zend_object_store_get_object(getThis() 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object TSRMLS_CC);
+   date_initialize(zend_object_store_get_object(getThis() 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43808.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug43808.phpt
+++ php-src/ext/date/tests/bug43808.phpt
--TEST--
Bug #43808 (date_create never fails (even when it should))
--FILE--

--EXPECT--
bool(false)
array(4) {
  ["warning_count"]=>
  int(1)
  ["warnings"]=>
  array(1) {
[6]=>
string(29) "Double timezone specification"
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1)

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests bug43808.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 20:34:17 2008 UTC

  Added files: 
/php-src/ext/date/tests bug43808.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #43808 (date_create never fails (even when it should)).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.155&r2=1.156&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.155 php-src/ext/date/php_date.c:1.156
--- php-src/ext/date/php_date.c:1.155   Thu Jan 17 19:58:24 2008
+++ php-src/ext/date/php_date.c Thu Jan 17 20:34:17 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.155 2008/01/17 19:58:24 derick Exp $ */
+/* $Id: php_date.c,v 1.156 2008/01/17 20:34:17 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1832,7 +1832,7 @@
DATEG(last_errors) = last_errors;
 }
 
-static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, 
int time_str_len, char *format, zval *timezone_object TSRMLS_DC)
+static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, 
int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
 {
timelib_time   *now;
timelib_tzinfo *tzi;
@@ -1856,6 +1856,16 @@
// update last errors and warnings
update_errors_warnings(err TSRMLS_CC);
 
+
+   if (ctor && err && err->error_count) {
+   /* spit out the first library error message, at least */
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse 
time string (%s) at position %d (%c): %s", time_str,
+   err->error_messages[0].position, 
err->error_messages[0].character, err->error_messages[0].message);
+   }
+   if (err && err->error_count) {
+   return 0;
+   }
+
if (timezone_object) {
php_timezone_obj *tzobj;
 
@@ -1910,7 +1920,9 @@
if (free_tzi) {
timelib_tzinfo_dtor(tzi);
}
-   timelib_time_dtor(now); 
+   timelib_time_dtor(now);
+
+   return 1;
 }
 
 /* {{{ proto DateTime date_create([string time[, DateTimeZone object]])
@@ -1927,7 +1939,9 @@
}
 
date_instantiate(date_ce_date, return_value TSRMLS_CC);
-   date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), 
time_str, time_str_len, NULL, timezone_object TSRMLS_CC);
+   if (!date_initialize(zend_object_store_get_object(return_value 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
@@ -1945,7 +1959,9 @@
}
 
date_instantiate(date_ce_date, return_value TSRMLS_CC);
-   date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), 
time_str, time_str_len, format_str, timezone_object TSRMLS_CC);
+   if (!date_initialize(zend_object_store_get_object(return_value 
TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
@@ -1960,7 +1976,7 @@

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", 
&time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
-   date_initialize(zend_object_store_get_object(getThis() 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object TSRMLS_CC);
+   date_initialize(zend_object_store_get_object(getThis() 
TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43808.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug43808.phpt
+++ php-src/ext/date/tests/bug43808.phpt
--TEST--
Bug #43808 (date_create never fails (even when it should))
--FILE--

--EXPECT--
bool(false)
array(4) {
  ["warning_count"]=>
  int(1)
  ["warnings"]=>
  array(1) {
[6]=>
string(29) "Double timezone specification"
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
[0]=>
string(47) "The timezone could not be found in the database"
  }
}
array(4) {
  ["warning_count"]=>
  int(1)
  ["warnings"]=>
  array(1) {
[6]=>
string(29) "Double timezone specification"
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
[0]=>
string(47) "The timezone could not be found in the database"
  }
}
--UEXPECT--
bool(false)
array(4) {
  [u"warning_count"]=>
  int(1)
  [u"warnings"]=>
  array(1) {
[6]=>
string(29) "Double timezone specification"
  }
  [u"error_count"]=>
  int(1)
  [u"errors"]=>
  array(1) {
[0]=>
string(47) "The timezone could not be found in the database"
  }
}
array(4) {
  [u"warning_count"]=>
  int(1)
  [u"warnings"]=>
  array(1) {
[6]=>
string(29) "Double timezone specification"
  }
  [u"error_count"]=>
  int(1)
  [u"errors"]=>
  ar

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/tests bug43003.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 19:59:00 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests bug43003.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
using a timestamp).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.73&r2=1.2027.2.547.2.965.2.74&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.73 
php-src/NEWS:1.2027.2.547.2.965.2.74
--- php-src/NEWS:1.2027.2.547.2.965.2.73Thu Jan 17 18:49:31 2008
+++ php-src/NEWSThu Jan 17 19:58:59 2008
@@ -79,6 +79,8 @@
 
 - Fixed bug #43527 (DateTime created from a timestamp reports environment
   timezone). (Derick)
+- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
+  using a timestamp). (Derick)
 - Fixed bug #43143 (Warning about empty IV with MCRYPT_MODE_ECB). (Derick)
 - Fixed bug #43136 (possible crash on script execution timeout.
   The EG(function_state_ptr) is completely removed,
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.9&r2=1.43.2.45.2.51.2.10&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.9 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.10
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.9  Thu Jan 17 18:49:31 2008
+++ php-src/ext/date/php_date.c Thu Jan 17 19:59:00 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.9 2008/01/17 18:49:31 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.10 2008/01/17 19:59:00 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -273,6 +273,7 @@
 
 struct _php_timezone_obj {
zend_object std;
+   int initialized;
int type;
union {
timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
@@ -1632,6 +1633,7 @@

zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, 
Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
new_obj->type = old_obj->type;
+   new_obj->initialized = 1;
switch (new_obj->type) {
case TIMELIB_ZONETYPE_ID:
new_obj->tzi.tz = old_obj->tzi.tz;
@@ -2052,6 +2054,7 @@
if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
tzobj = (php_timezone_obj *) 
zend_object_store_get_object(return_value TSRMLS_CC);
+   tzobj->initialized = 1;
tzobj->type = dateobj->time->zone_type;
switch (dateobj->time->zone_type) {
case TIMELIB_ZONETYPE_ID:
@@ -2277,6 +2280,7 @@
tzobj = zend_object_store_get_object(getThis() 
TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
+   tzobj->initialized = 1;
} else {
ZVAL_NULL(getThis());
}
@@ -2297,7 +2301,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
 
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
@@ -2360,7 +2364,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
 
@@ -2383,7 +2387,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
if (tzobj->type != TIMELIB_ZONETYPE_ID) {
RETURN_FALSE;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43003.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug43003.phpt
+++ php-src/ext/date/tests/bug43003.phpt
--TEST--
Bug #43003 (Invalid timezone reported for DateTime objects constructed using a 
timestamp)
--FILE--
getTimezone()->getName().": " .  $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest->setTimezone(new DateTimeZone("UTC"));
echo $oDateTest->getTimezone()->getName().": " .  $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest->setTimezone(new DateTimeZone(date_default_timezone_get()));
echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDat

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests bug43003.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 19:58:24 2008 UTC

  Added files: 
/php-src/ext/date/tests bug43003.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
using a timestamp).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.154&r2=1.155&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.154 php-src/ext/date/php_date.c:1.155
--- php-src/ext/date/php_date.c:1.154   Thu Jan 17 18:48:43 2008
+++ php-src/ext/date/php_date.c Thu Jan 17 19:58:24 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.154 2008/01/17 18:48:43 derick Exp $ */
+/* $Id: php_date.c,v 1.155 2008/01/17 19:58:24 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -276,6 +276,7 @@
 
 struct _php_timezone_obj {
zend_object std;
+   int initialized;
int type;
union {
timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
@@ -1762,6 +1763,7 @@

zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, 
Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
new_obj->type = old_obj->type;
+   new_obj->initialized = 1;
switch (new_obj->type) {
case TIMELIB_ZONETYPE_ID:
new_obj->tzi.tz = old_obj->tzi.tz;
@@ -2210,6 +2212,7 @@
if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
tzobj = (php_timezone_obj *) 
zend_object_store_get_object(return_value TSRMLS_CC);
+   tzobj->initialized = 1;
tzobj->type = dateobj->time->zone_type;
switch (dateobj->time->zone_type) {
case TIMELIB_ZONETYPE_ID:
@@ -2435,6 +2438,7 @@
tzobj = zend_object_store_get_object(getThis() 
TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
+   tzobj->initialized = 1;
} else {
ZVAL_NULL(getThis());
}
@@ -2455,7 +2459,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
 
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
@@ -2518,7 +2522,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject 
TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
 
@@ -2541,7 +2545,7 @@
RETURN_FALSE;
}
tzobj = (php_timezone_obj *) zend_object_store_get_object(object 
TSRMLS_CC);
-   DATE_CHECK_INITIALIZED(tzobj->tzi.tz, DateTimeZone);
+   DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
if (tzobj->type != TIMELIB_ZONETYPE_ID) {
RETURN_FALSE;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43003.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/bug43003.phpt
+++ php-src/ext/date/tests/bug43003.phpt
--TEST--
Bug #43003 (Invalid timezone reported for DateTime objects constructed using a 
timestamp)
--FILE--
getTimezone()->getName().": " .  $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest->setTimezone(new DateTimeZone("UTC"));
echo $oDateTest->getTimezone()->getName().": " .  $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest->setTimezone(new DateTimeZone(date_default_timezone_get()));
echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest = new DateTime("@0");
echo $oDateTest->getTimezone()->getName().": " .  $oDateTest->format("Y-m-d 
H:i:s")."\n";

$oDateTest->setTimezone( new DateTimeZone(date_default_timezone_get()));
echo $oDateTest->getTimezone()->getName().": " . $oDateTest->format("Y-m-d 
H:i:s")."\n";
?>
--EXPECT--
+00:00: 1970-01-01 00:00:00
UTC: 1970-01-01 00:00:00
Europe/Oslo: 1970-01-01 01:00:00
+00:00: 1970-01-01 00:00:00
Europe/Oslo: 1970-01-01 01:00:00

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/lib parse_date.c /ext/date/tests bug40743.phpt bug42910.phpt bug43527.phpt

2008-01-17 Thread Derick Rethans
derick  Thu Jan 17 18:49:55 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests bug40743.phpt bug42910.phpt bug43527.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c 
  Log:
  - MFH: Added support for abbreviation and offset based timezone specifiers for
DateTime::getOffset() and DateTime::getName().
  - MFH: Fixed bug #43527 (DateTime created from a timestamp reports environment
timezone).
  - MFH: Fixed bug #42190 (Constructing DateTime with TimeZone Indicator
invalidates DateTimeZone).
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.72&r2=1.2027.2.547.2.965.2.73&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.72 
php-src/NEWS:1.2027.2.547.2.965.2.73
--- php-src/NEWS:1.2027.2.547.2.965.2.72Wed Jan 16 14:21:07 2008
+++ php-src/NEWSThu Jan 17 18:49:31 2008
@@ -11,6 +11,8 @@
- strtotime() / new DateTime
- date_create_from_format() / DateTime::createFromFormat()
- date_parse_from_format()
+  * support for abbreviation and offset based timezone specifiers for
+DateTime::getOffset() and DateTime::getName().
 
 - Added ability to use Traversable objects instead of plain arrays in ext/soap.
   (Joshua Reese, Dmitry)
@@ -75,6 +77,8 @@
 
 - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
 
+- Fixed bug #43527 (DateTime created from a timestamp reports environment
+  timezone). (Derick)
 - Fixed bug #43143 (Warning about empty IV with MCRYPT_MODE_ECB). (Derick)
 - Fixed bug #43136 (possible crash on script execution timeout.
   The EG(function_state_ptr) is completely removed,
@@ -94,6 +98,8 @@
 - Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (hartmut)
 - Fixed bug #42509 (gmp leaks memory when gmp_init() not used). (Stas)
 - Fixed bug #42284 (duplicate of #39700). (Lars W)
+- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates
+  DateTimeZone). (Derick)
 - Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric
   characters). (Jani)
 - Fixed bug #41522 (PDO firebird driver returns null if it fails to connect). 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.8&r2=1.43.2.45.2.51.2.9&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.8 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.9
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.8  Sun Jan 13 18:42:19 2008
+++ php-src/ext/date/php_date.c Thu Jan 17 18:49:31 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.8 2008/01/13 18:42:19 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.9 2008/01/17 18:49:31 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -273,7 +273,17 @@
 
 struct _php_timezone_obj {
zend_object std;
-   timelib_tzinfo *tz;
+   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;
+   } tzi;
 };
 
 #define DATE_SET_CONTEXT \
@@ -820,7 +830,26 @@
  );
  break;
case 'T': length = slprintf(buffer, 32, "%s", localtime 
? offset->abbr : "GMT"); break;
-   case 'e': length = slprintf(buffer, 32, "%s", localtime 
? t->tz_info->name : "UTC"); break;
+   case 'e': if (!localtime) {
+ length = slprintf(buffer, 32, 
"%s", "UTC");
+ } else {
+ switch (t->zone_type) {
+ case 
TIMELIB_ZONETYPE_ID:
+ length = 
slprintf(buffer, 32, "%s", t->tz_info->name);
+ break;
+ case 
TIMELIB_ZONETYPE_ABBR:
+ length = 
slprintf(buffer, 32, "%s", offset->abbr);
+ break;
+ case 
TIMELIB_ZONETYPE_OFFSET:
+ length = 
slprintf(buffer, 32, "%c%02d:%02d",
+

<    1   2   3   4   5   6   7   8   9   10   >