/nusoap/lib/class.nusoap_base.php-Dateireferenz

gehe zum Quellcode dieser Datei

Klassen

class  nusoap_base

Funktionen

 timestamp_to_iso8601 ($timestamp, $utc=true)
 iso8601_to_timestamp ($datestr)
 usleepWindows ($usec)

Variablen

 $GLOBALS ['_transient']['static']['nusoap_base']['globalDebugLevel'] = 9


Dokumentation der Funktionen

iso8601_to_timestamp ( datestr  ) 

convert ISO 8601 compliant date string to unix timestamp

Parameter:
string $datestr ISO 8601 compliant date string
Rückgabe:
mixed Unix timestamp (int) or false public

Definiert in Zeile 942 der Datei class.nusoap_base.php.

00942                                        {
00943         $eregStr =
00944         '([0-9]{4})-'.  // centuries & years CCYY-
00945         '([0-9]{2})-'.  // months MM-
00946         '([0-9]{2})'.   // days DD
00947         'T'.                    // separator T
00948         '([0-9]{2}):'.  // hours hh:
00949         '([0-9]{2}):'.  // minutes mm:
00950         '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
00951         '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
00952         if(ereg($eregStr,$datestr,$regs)){
00953                 // not utc
00954                 if($regs[8] != 'Z'){
00955                         $op = substr($regs[8],0,1);
00956                         $h = substr($regs[8],1,2);
00957                         $m = substr($regs[8],strlen($regs[8])-2,2);
00958                         if($op == '-'){
00959                                 $regs[4] = $regs[4] + $h;
00960                                 $regs[5] = $regs[5] + $m;
00961                         } elseif($op == '+'){
00962                                 $regs[4] = $regs[4] - $h;
00963                                 $regs[5] = $regs[5] - $m;
00964                         }
00965                 }
00966                 return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
00967 //              return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
00968         } else {
00969                 return false;
00970         }
00971 }

timestamp_to_iso8601 ( timestamp,
utc = true 
)

convert unix timestamp to ISO 8601 compliant date string

Parameter:
int $timestamp Unix time stamp
boolean $utc Whether the time stamp is UTC or local
Rückgabe:
mixed ISO 8601 date string or false public

Definiert in Zeile 904 der Datei class.nusoap_base.php.

00904                                                    {
00905         $datestr = date('Y-m-d\TH:i:sO',$timestamp);
00906         $pos = strrpos($datestr, "+");
00907         if ($pos === FALSE) {
00908                 $pos = strrpos($datestr, "-");
00909         }
00910         if ($pos !== FALSE) {
00911                 if (strlen($datestr) == $pos + 5) {
00912                         $datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2);
00913                 }
00914         }
00915         if($utc){
00916                 $eregStr =
00917                 '([0-9]{4})-'.  // centuries & years CCYY-
00918                 '([0-9]{2})-'.  // months MM-
00919                 '([0-9]{2})'.   // days DD
00920                 'T'.                    // separator T
00921                 '([0-9]{2}):'.  // hours hh:
00922                 '([0-9]{2}):'.  // minutes mm:
00923                 '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
00924                 '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
00925 
00926                 if(ereg($eregStr,$datestr,$regs)){
00927                         return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
00928                 }
00929                 return false;
00930         } else {
00931                 return $datestr;
00932         }
00933 }

usleepWindows ( usec  ) 

sleeps some number of microseconds

Parameter:
string $usec the number of microseconds to sleep public
Veraltet:

Definiert in Zeile 980 der Datei class.nusoap_base.php.

00981 {
00982         $start = gettimeofday();
00983         
00984         do
00985         {
00986                 $stop = gettimeofday();
00987                 $timePassed = 1000000 * ($stop['sec'] - $start['sec'])
00988                 + $stop['usec'] - $start['usec'];
00989         }
00990         while ($timePassed < $usec);
00991 }


Variablen-Dokumentation

$GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = 9

Definiert in Zeile 74 der Datei class.nusoap_base.php.

Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen