Yago Riveiro
Yago Riveiro

Reputation: 727

Solr's datetime field is stored wrong

Why when I try to store the datetime 000-00-00T00:00:00Z (the data source is Mysql) into solr it's saved as 0002-11-30T00:00:00Z?

Can Solr store datetime with format 0000-00-00T00:00:00Z?

<response>
<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">2</int>
</lst>
<result name="response" numFound="334" start="0">
<doc>
  <short name="contacts">0</short>
  <str name="country">PT</str>
  <str name="email"/>
  <date name="first_visit_datetime">0002-11-30T00:00:00Z</date>
  <long name="id">101</long>
  <date name="last_visit_datetime">0002-11-30T00:00:00Z</date>
  <str name="name"/>
  <str name="organization"/>
  <str name="phone"/>
  <str name="region">14</str>
  <short name="visits">0</short>
</doc>

Upvotes: 0

Views: 493

Answers (1)

Vincenzo Maggio
Vincenzo Maggio

Reputation: 3869

Nope, it's derived from ISO 8601 and I think it's always the same.

Upvotes: 2

Related Questions