ez projects / ezfeedparse / forum / general / how gettimestamp of an entry ?
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 23 |
Tuesday 14 July 2009 3:25:09 pm Hi Damien,
I use your extension for generate a list. The problem is that I can't access to the published date. $item.published.date give me a DateTime object with no public property... Logica WebFactory |
|
Member since: Posts: 3 |
Wednesday 22 July 2009 7:14:22 pm We have the same problem.
The problem is that the object DateTime returned from ezcFeedDateElement doesn't have public properties that can be accessed. We wrote a little workaround: Index: extension/ezfeedparse/classes/eztemplateobject.php =================================================================== --- extension/ezfeedparse/classes/eztemplateobject.php (revision 7) +++ extension/ezfeedparse/classes/eztemplateobject.php (working copy) @@ -40,6 +40,10 @@ $val = $this->object->$name; if ( is_object( $val ) ) { + if ( $val instanceof DateTime ) + { + return $val->format( 'U' ); + } return new eZTemplateObject( $val ); } else if ( is_array( $val ) ) -- |
|
|
Member since: Posts: 40 |
Friday 23 October 2009 11:08:10 pm Thanks for the report and the patch, this is now fixed in trunk and in the 0.2 version.
Damien |
You need to be logged in to post messages in the forums. New users may register here.