mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
vbXMLRPC needs a slightly different dateformat.
This commit is contained in:
parent
d847c0e125
commit
00ce9a3181
@ -27,9 +27,19 @@
|
||||
{
|
||||
if (!is_array($date))
|
||||
{
|
||||
if(strstr($_SERVER['HTTP_USER_AGENT'],"vbXMLRPC"))
|
||||
{
|
||||
return date('Ymd\TH:i:s',$date);
|
||||
}
|
||||
return date('Y-m-d\TH:i:s',$date);
|
||||
}
|
||||
return sprintf('%04d-%02d-%02dT%02d:%02d:%02d',
|
||||
|
||||
$formatstring = "%04d-%02d-%02dT%02d:%02d:%02d";
|
||||
if(strstr($_SERVER['HTTP_USER_AGENT'],"vbXMLRPC"))
|
||||
{
|
||||
$formatstring = "%04d%02d%02dT%02d:%02d:%02d";
|
||||
}
|
||||
return sprintf($formatstring,
|
||||
$date['year'],$date['month'],$date['mday'],
|
||||
$date['hour'],$date['min'],$date['sec']);
|
||||
}
|
||||
|
@ -237,7 +237,8 @@
|
||||
}
|
||||
$_type = (is_integer($_res) ? 'int' : gettype($_res));
|
||||
|
||||
if ($_type == 'string' && ereg('^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res))
|
||||
if ($_type == 'string' && (ereg('^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res)
|
||||
|| ereg('^[0-9]{4}[0-9]{2}[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res) ) )
|
||||
{
|
||||
$_type = 'dateTime.iso8601';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user