You are here

function apachesolr_date_iso in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_date_iso()
  2. 5.2 apachesolr.module \apachesolr_date_iso()
  3. 6.3 apachesolr.module \apachesolr_date_iso()
  4. 6 apachesolr.module \apachesolr_date_iso()
  5. 7 apachesolr.module \apachesolr_date_iso()

Convert date from timestamp into ISO 8601 format.

Parameters

timestamp $date_timestamp: A timestamp to convert to ISO 8601 format

Return value

A date in ISO 8601 format

See also

http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html

6 calls to apachesolr_date_iso()
apachesolr_commentsearch_node_to_comments in contrib/apachesolr_commentsearch/apachesolr_commentsearch.module
apachesolr_date_datestamp_field_indexing_callback in contrib/apachesolr_date/apachesolr_date.module
This function is used during indexing to normalize the DATESTAMP fields into the appropriate format for Apache Solr.
apachesolr_date_date_field_indexing_callback in contrib/apachesolr_date/apachesolr_date.module
This function is used during indexing to normalize the DATE and DATETIME fields into the appropriate format for Apache Solr.
apachesolr_date_search_date_range in contrib/apachesolr_date/apachesolr_date.module
When faceting and filtering we need to infer ranges of dates. This function looks at a query and a facet field and returns a date range for use in querying.
apachesolr_node_to_document in ./apachesolr.index.inc
Given a node, return a document representing that node.

... See full list

File

./apachesolr.module, line 528
Integration with the Apache Solr search application.

Code

function apachesolr_date_iso($date_timestamp) {
  return gmdate('Y-m-d\\TH:i:s\\Z', $date_timestamp);
}