iso8601_to_timestamp ( datestr  ) 

Parameters:
string $datestr ISO 8601 compliant date string public

Definition at line 854 of file class.nusoap_base.php.

References $op.

00854                                        {
00855         $eregStr =
00856         '([0-9]{4})-'.  // centuries & years CCYY-
00857         '([0-9]{2})-'.  // months MM-
00858         '([0-9]{2})'.   // days DD
00859         'T'.                    // separator T
00860         '([0-9]{2}):'.  // hours hh:
00861         '([0-9]{2}):'.  // minutes mm:
00862         '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
00863         '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
00864         if(ereg($eregStr,$datestr,$regs)){
00865                 // not utc
00866                 if($regs[8] != 'Z'){
00867                         $op = substr($regs[8],0,1);
00868                         $h = substr($regs[8],1,2);
00869                         $m = substr($regs[8],strlen($regs[8])-2,2);
00870                         if($op == '-'){
00871                                 $regs[4] = $regs[4] + $h;
00872                                 $regs[5] = $regs[5] + $m;
00873                         } elseif($op == '+'){
00874                                 $regs[4] = $regs[4] - $h;
00875                                 $regs[5] = $regs[5] - $m;
00876                         }
00877                 }
00878                 return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
00879         } else {
00880                 return false;
00881         }
00882 }


Generated on Thu Oct 30 12:06:14 2008 for XSoap 4.0 by  doxygen 1.5.5