WDDX: dateTime

From: Date: Sun, 27 Feb 2000 19:10:32 +0000
Subject: WDDX: dateTime
Groups: php.version4 
Request: Send a blank email to php-version4+get-11086@lists.php.net to get a copy of this message
Hello, the WDDX dateTime data type is not recognized in the PHP interface, and packets containing such a value aren't decoded correctly. The following tiny diff against the latest 4.0 CVS treats dateTime the same way as string, when deserializing a packet. I've found this an acceptable compromise. Anyone up to implement recordset like the Perl module does? -Tobias Index: wddx.c =================================================================== RCS file: /repository/php4/ext/wddx/wddx.c,v retrieving revision 1.25 diff -u -u -r1.25 wddx.c --- wddx.c 2000/02/17 23:08:33 1.25 +++ wddx.c 2000/02/27 19:00:50 @@ -47,6 +47,7 @@ #define EL_NUMBER "number" #define EL_PACKET "wddxPacket" #define EL_STRING "string" +#define EL_DATETIME "dateTime" #define EL_STRUCT "struct" #define EL_VALUE "value" #define EL_VAR "var" @@ -506,7 +507,7 @@ if (!strcmp(atts[i], EL_VERSION)) { } } - } else if (!strcmp(name, EL_STRING)) { + } else if (!strcmp(name, EL_STRING) || !strcmp(name, EL_DATETIME)) { ent.type = ST_STRING; SET_STACK_VARNAME; @@ -600,7 +601,8 @@ if (!strcmp(name, EL_STRING) || !strcmp(name, EL_NUMBER) || !strcmp(name, EL_BOOLEAN) || !strcmp(name, EL_NULL) || - !strcmp(name, EL_ARRAY) || !strcmp(name, EL_STRUCT)) { + !strcmp(name, EL_ARRAY) || !strcmp(name, EL_STRUCT) || + !strcmp(name, EL_DATETIME)) { if (stack->top > 1) { wddx_stack_top(stack, (void**)&ent1); stack->top--;

« previous php.version4 (#11086) next »