Go to the source code of this file.
Data Structures | |
| class | nusoap_base |
| nusoap_base More... | |
| class | soap_fault |
| soap_fault class, allows for creation of faults mainly used for returning faults from deployed functions in a server instance. More... | |
| class | XMLSchema |
| parses an XML Schema, allows access to it's data, other utility methods no validation... More... | |
| class | soapval |
| for creating serializable abstractions of native PHP types NOTE: this is only really used when WSDL is not available. More... | |
| class | soap_transport_http |
| transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support More... | |
| class | soap_server |
| soap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses More... | |
| class | wsdl |
| parses a WSDL file, allows access to it's data, other utility methods More... | |
| class | soap_parser |
| soap_parser class parses SOAP XML messages into native PHP values More... | |
| class | soap_client |
| soapclient higher level class for easy usage. More... | |
Functions | |
| timestamp_to_iso8601 ($timestamp, $utc=true) | |
| convert unix timestamp to ISO 8601 compliant date string | |
| iso8601_to_timestamp ($datestr) | |
| convert ISO 8601 compliant date string to unix timestamp | |
| usleepWindows ($usec) | |
| iso8601_to_timestamp | ( | $ | datestr | ) |
convert ISO 8601 compliant date string to unix timestamp
| string | $datestr ISO 8601 compliant date string public |
Definition at line 614 of file nusoap.php.
{
$eregStr =
'([0-9]{4})-'. // centuries & years CCYY-
'([0-9]{2})-'. // months MM-
'([0-9]{2})'. // days DD
'T'. // separator T
'([0-9]{2}):'. // hours hh:
'([0-9]{2}):'. // minutes mm:
'([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
'(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
if(ereg($eregStr,$datestr,$regs)){
// not utc
if($regs[8] != 'Z'){
$op = substr($regs[8],0,1);
$h = substr($regs[8],1,2);
$m = substr($regs[8],strlen($regs[8])-2,2);
if($op == '-'){
$regs[4] = $regs[4] + $h;
$regs[5] = $regs[5] + $m;
} elseif($op == '+'){
$regs[4] = $regs[4] - $h;
$regs[5] = $regs[5] - $m;
}
}
return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
} else {
return false;
}
}
| timestamp_to_iso8601 | ( | $ | timestamp, | |
| $ | utc = true | |||
| ) |
convert unix timestamp to ISO 8601 compliant date string
| string | $timestamp Unix time stamp public |
Definition at line 586 of file nusoap.php.
{
$datestr = date('Y-m-d\TH:i:sO',$timestamp);
if($utc){
$eregStr =
'([0-9]{4})-'. // centuries & years CCYY-
'([0-9]{2})-'. // months MM-
'([0-9]{2})'. // days DD
'T'. // separator T
'([0-9]{2}):'. // hours hh:
'([0-9]{2}):'. // minutes mm:
'([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
'(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
if(ereg($eregStr,$datestr,$regs)){
return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
}
return false;
} else {
return $datestr;
}
}
1.7.1