basdenooijer/solarium — Issue #58: I would love something that handles dates to the solr/lucene format
Author: stefanooldeman
Created: 2012-01-11 08:38:11+00:00
State: open

This is the [DateField](http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html) that is handled in solr. But this is slightly different than the full RFC 3339. So this is how i convert my dates. see:

RFC 3339 :
2011-12-01T00:00:00+01:00
solr expects:
2000-05-23T22:00:00Z

````
// return everything but the 6 chars and add a Z (The trailing "Z" designates UTC time and is mandatory)
$date = new Zend_Date($input);
$dateValue = $date->toString(Zend_Date::RFC_3339);
$dateValue = substr($dateValue, 0, strlen($dateValue) -6) . 'Z';
````

I have a few questions:

1. where should this be added eg. within a ``helper`` or intergrated in the ``Solarium_Query_Select`` etc.
3. is this wanted functionality / how do other think about this feature