ZF-9807: getPosts date option formatting incorrect or not clear in documentation
Description
The delicious api allows for filtering by date in the api: http://delicious.com/help/api#posts_get
However the implmentation in zend_service_delicious is not in the correct format even though a correctly formatted date is passed through using Zend_Date.
The format that can work is (line 290 onwards):
$parms = array();
if ($tag) {
$parms['tag'] = $tag;
}
if ($url) {
$parms['url'] = $url;
}
if ($dt) {
$parms['dt'] = $dt->get('Y-M-d')."T".$dt->get('H:m:s')."Z";
}
$response = $this->makeRequest(self::PATH_POSTS_GET, $parms);
return $this->_parseXmlPostList($response);
yet the current code will output an incorrect format where months are implimented as minutes and the forward slashes do not create the literal T and Z chracters needed. If some other formatting is required before passing the date then this should be documented better in http://framework.zend.com/manual/en/zend.date.html
Current code:
$parms = array();
if ($tag) {
$parms['tag'] = $tag;
}
if ($url) {
$parms['url'] = $url;
}
if ($dt) {
$parms['dt'] = $dt->get('Y-m-d\TH:i:s\Z');
}
$response = $this->makeRequest(self::PATH_POSTS_GET, $parms);
return $this->_parseXmlPostList($response);
Comments
Posted by Thomas Weidner (thomas) on 2011-08-26T17:31:25.000+0000
Fixed in ZF2 with GH-331