From: Esben L. <li...@hy...> - 2005-12-27 22:19:27
|
it returns the local time, im my case GMT+1 or CET perhaps it would be better if it could return time like .NET does: 2005-12-27T20:52:26.9218750+01:00 or something like it.. I really like the +01:00 option, then you are never in doubt :-) -- Esben Miles Lott wrote: > It looks fine to me. I put that in there with the comments a long time > ago. I thought, at least at the time, that a default format of nothing > would use whatever the system default really is. Whatever works. I say > commit it. Now, does this return the server time, user time, or GMT ? > > On Tue, 2005-12-27 at 22:58 +0100, Esben Laursen wrote: > >>Hi Ralf, Miles or some other. :-) >> >>I have a small requst.. I would like to be able to get the time from the >>server through xmlrpc. It looks like someone already have done all the >>code, but it seems to commented out... >> >>I have uncommented it, made a little change and tested it. But Im not >>much for committing it to the CVS without some php guru giving it a >>green light. >> >>So, I have attached small patch.. Would someone please have a look at it >>and make me happy by commiting it... :-) >> >>Its made with 1.0 version, but it looks the same in 1.2 >> >>Cheers >> >>Esben >>plain text document attachment (xml_functions.diff) >>*** /var/www/untared/egroupware/phpgwapi/inc/xml_functions.inc.php 2005-08-19 14:33:21.000000000 +0200 >>--- xml_functions.inc.php 2005-12-27 08:56:19.172677664 +0100 >>*************** >>*** 928,947 **** >> } >> */ >> >>! /* >> $GLOBALS['_xmlrpcs_egw_time_sig'] = array(array(xmlrpcString,xmlrpcString)); >> $GLOBALS['_xmlrpcs_egw_time_doc'] = 'Returns system time based on optional format string'; >> function _xmlrpcs_time($server,$m) >> { >> $format = $m->getParam(0); >>! $format = $format ? $format : 'Y/m/d H:i'; >> >> return CreateObject( >> 'phpgwapi.xmlrpcresp', >> CreateObject('phpgwapi.xmlrpcval', date($format,time()), 'string') >> ); >> } >>! */ >> >> /* Add the system functions to the server map */ >> $GLOBALS['_xmlrpcs_dmap'] = array( >>--- 928,947 ---- >> } >> */ >> >>! >> $GLOBALS['_xmlrpcs_egw_time_sig'] = array(array(xmlrpcString,xmlrpcString)); >> $GLOBALS['_xmlrpcs_egw_time_doc'] = 'Returns system time based on optional format string'; >> function _xmlrpcs_time($server,$m) >> { >> $format = $m->getParam(0); >>! $format = $format ? $format : 'Y/m/d H:i:s'; >> >> return CreateObject( >> 'phpgwapi.xmlrpcresp', >> CreateObject('phpgwapi.xmlrpcval', date($format,time()), 'string') >> ); >> } >>! >> >> /* Add the system functions to the server map */ >> $GLOBALS['_xmlrpcs_dmap'] = array( >>*************** >>*** 974,980 **** >> 'function' => '_xmlrpcs_phpgw_api_version', >> 'signature' => $GLOBALS['_xmlrpcs_phpgw_api_version_sig'], >> 'docstring' => $GLOBALS['_xmlrpcs_phpgw_api_version_doc'] >>! ) >> /* >> 'system.listApps' => array( >> 'function' => '_xmlrpcs_listApps', >>--- 974,980 ---- >> 'function' => '_xmlrpcs_phpgw_api_version', >> 'signature' => $GLOBALS['_xmlrpcs_phpgw_api_version_sig'], >> 'docstring' => $GLOBALS['_xmlrpcs_phpgw_api_version_doc'] >>! ), >> /* >> 'system.listApps' => array( >> 'function' => '_xmlrpcs_listApps', >>*************** >>*** 982,994 **** >> 'docstring' => $GLOBALS['_xmlrpcs_listApps_doc'] >> ), >> */ >>- /* >> 'system.time' => array( >> 'function' => '_xmlrpcs_time', >> 'signature' => $GLOBALS['_xmlrpcs_time_sig'], >> 'docstring' => $GLOBALS['_xmlrpcs_time_doc'] >> ) >>! */ >> ); >> >> $GLOBALS['_xmlrpc_debuginfo'] = ''; >>--- 982,993 ---- >> 'docstring' => $GLOBALS['_xmlrpcs_listApps_doc'] >> ), >> */ >> 'system.time' => array( >> 'function' => '_xmlrpcs_time', >> 'signature' => $GLOBALS['_xmlrpcs_time_sig'], >> 'docstring' => $GLOBALS['_xmlrpcs_time_doc'] >> ) >>! >> ); >> >> $GLOBALS['_xmlrpc_debuginfo'] = ''; > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > eGroupWare-core mailing list > eGr...@li... > https://lists.sourceforge.net/lists/listinfo/egroupware-core > > > |